Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error setting aws_dms_endpoint with extra_connection_attributes setting cdcMaxBatchInterval #8807

Closed
mikebollandajw opened this issue May 29, 2019 · 4 comments
Labels
bug Addresses a defect in current functionality. service/s3 Issues and PRs that pertain to the s3 service. stale Old or inactive issues managed by automation, if no further action taken these will get closed.

Comments

@mikebollandajw
Copy link

mikebollandajw commented May 29, 2019

Terraform Version

0.11.11
"aws" (2.0.0)...

Affected Resource(s)

aws_dms_endpoint
extra_connection_attributes

Terraform Configuration Files

resource "aws_dms_endpoint" "dms-s3-endpoint-target" {
  endpoint_id                 = "s3-${var.be_region}-${var.bucket_suffix}-adsprocessor2"
  endpoint_type               = "target"
  engine_name                 = "s3"
  extra_connection_attributes = "cdcMaxBatchInterval=10;compressionType=NONE;csvDelimiter=,;csvRowDelimiter="

  s3_settings = {
    service_access_role_arn = "${aws_iam_role.dms-iam-role.arn}"
    bucket_name             = "s3-${var.be_region}-${var.shortenv}-${var.bucket_suffix}"
    bucket_folder           = "${var.target_bucket_folder}"
    compression_type        = "NONE"
  }
}

Debug Output

Terraform will perform the following actions:

      extra_connection_attributes: "compressionType=none;csvDelimiter=,;csvRowDelimiter=\n;" => "cdcMaxBatchInterval=10;compressionType=none;csvDelimiter=,;csvRowDelimiter=\n;"

Panic Output

StartReplicationTask operation: Test connection for replication instance dms-eu-west-2-s-adsprocessor and endpointname should be successful for starting the replication task

Endpoint test result: Test Endpoint failed: Application-Status: 1020912, Application-Message: Failed to connect to database.

Expected Behavior

The endpoint extra connection attribute cdcMaxBatchInterval should exist

The bucket name should be set in the endpoint

Actual Behavior

-The endpoint loses its bucket name (in the aws console) and test fails when attempted

-Setting the bucket name back into the endpoint and testing still fails test

-The endpoint must be destroyed to fix the issue

-You cannot destroy an endpoint that is in use by a task, therefore you must destroy everything else

-AWS support cannot resolve the issue without destroying the endpoint

-They say the issue is terraform

Steps to Reproduce

  1. terraform apply

Important Factoids

No

@mikebollandajw
Copy link
Author

mikebollandajw commented May 29, 2019

Manually defining the bucketName in the extra connection attribute will get around the endpoint corruption

However cdcMaxBatchInterval will be missing from the endpoint if viewed via DMS task manager - the state however will show it as there...

extra_connection_attributes: "compressionType=none;csvDelimiter=,;csvRowDelimiter=\n;" => "bucketName=s3-eu-west-2-s-ads-staging-cdc;cdcMaxBatchInterval=10compressionType=none;csvDelimiter=,;csvRowDelimiter=\n;"

ie


resource "aws_dms_endpoint" "dms-s3-endpoint-target" {
  endpoint_id                 = "s3-${var.be_region}-${var.bucket_suffix}-adsprocessor2"
  endpoint_type               = "target"
  engine_name                 = "s3"
  extra_connection_attributes = "bucketName=s3-${var.be_region}-${var.shortenv}-${var.bucket_suffix};${var.target_extra_connection_attributes}"

  s3_settings = {
    service_access_role_arn = "${aws_iam_role.dms-iam-role.arn}"
    bucket_name             = "s3-${var.be_region}-${var.shortenv}-${var.bucket_suffix}"
    bucket_folder           = "${var.target_bucket_folder}"
    compression_type        = "NONE"
  }
}

So i believe the endpoint corruption issue is something to do with the bucketName not being automatically appended when you use the cdcMaxBatchInterval setting

And finally that the cdcMaxBatchInterval is not being applied to the endpoint perhaps due to it being an unknown property

@aeschright aeschright added needs-triage Waiting for first response or review from a maintainer. service/s3 Issues and PRs that pertain to the s3 service. labels Jun 19, 2019
@aeschright aeschright added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Dec 18, 2019
@aeschright aeschright changed the title extra_connection_attributes cdcMaxBatchInterval (dms s3) Error setting aws_dms_endpoint with extra_connection_attributes setting cdcMaxBatchInterval Dec 18, 2019
@github-actions
Copy link

github-actions bot commented Dec 7, 2021

Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!

@github-actions github-actions bot added the stale Old or inactive issues managed by automation, if no further action taken these will get closed. label Dec 7, 2021
@github-actions github-actions bot closed this as completed Jan 6, 2022
@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/s3 Issues and PRs that pertain to the s3 service. stale Old or inactive issues managed by automation, if no further action taken these will get closed.
Projects
None yet
Development

No branches or pull requests

3 participants