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

aws_dms_replication_task: InvalidParameterValueException: Invalid CdcStartPosition format #23319

Closed
oirtemed opened this issue Feb 22, 2022 · 1 comment · Fixed by #23328
Closed
Labels
bug Addresses a defect in current functionality.

Comments

@oirtemed
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform CLI and Terraform AWS Provider Version

 Terraform v0.14.10
+ provider registry.terraform.io/hashicorp/aws v3.64.0

Affected Resource(s)

  • aws_dms_replication_task

Terraform Configuration Files

resource "aws_dms_replication_task" "cdc_user" {
  replication_task_id       = "cdc-user"
  source_endpoint_arn       = aws_dms_endpoint.dc.endpoint_arn
  target_endpoint_arn       = aws_dms_endpoint.aws.endpoint_arn
  replication_instance_arn  = aws_dms_replication_instance.db.replication_instance_arn
  migration_type            = "cdc"
  table_mappings            = jsonencode(jsondecode(file("${path.module}/files/cdc-user_table_mappings.json")))
  replication_task_settings = jsonencode(jsondecode(file("${path.module}/files/cdc-user_task_settings.json")))
}

Debug Output

Panic Output

Expected Behavior

After upgrading the AWS provider from v3.58.0 to v3.64.0 Terraform should have maintained the existing cdc_start_position value for the replication task instead of setting that to null.

Actual Behavior

terraform plan output

   # aws_dms_replication_task.cdc_user will be updated in-place
   ~ resource "aws_dms_replication_task" "cdc_user" {
       - cdc_start_position        = "2021-12-14T12:15:05" -> null
         id                        = "cdc-user"
       ~ replication_task_settings = jsonencode(
           ~ {
               - TTSettings                          = {
                   - EnableTT         = false
                   - TTRecordSettings = null
                   - TTS3Settings     = null
                 } -> null
                 # (13 unchanged elements hidden)
             }
         )
         tags                      = {}
         # (8 unchanged attributes hidden)
     }

terraform apply fails with the error below


Error: InvalidParameterValueException: Invalid CdcStartPosition format
	status code: 400, request id: 35cc8d70-1267-4326-babd-f8b3367303fd

  on main.tf line 385, in resource "aws_dms_replication_task" "cdc_user":
385: resource "aws_dms_replication_task" "cdc_user" {

Steps to Reproduce

  1. terraform apply
  2. upgrade provider from v3.58.0 to v3.64.0
  3. terraform apply

Important Factoids

Probably the task has been stopped/resumed after the task was created by terraform and no changes were detected in the plans since the option was not supported until v3.62.0.

References

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. service/databasemigrationservice labels Feb 22, 2022
@anGie44 anGie44 added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Feb 22, 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 11, 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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants