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

[Bug]: Can't set RecordFailureDelayInMinutes in aws_dms_replication_task #32194

Closed
slords opened this issue Jun 23, 2023 · 6 comments · Fixed by #34356
Closed

[Bug]: Can't set RecordFailureDelayInMinutes in aws_dms_replication_task #32194

slords opened this issue Jun 23, 2023 · 6 comments · Fixed by #34356
Labels
bug Addresses a defect in current functionality. service/dms Issues and PRs that pertain to the dms service.
Milestone

Comments

@slords
Copy link

slords commented Jun 23, 2023

Terraform Core Version

1.5.1

AWS Provider Version

5.2.0

Affected Resource(s)

  • aws_dms_replication_task

When trying to set RecordFailureDelayInMinutes on a dms replication task the plan and apply show that it is going to apply the changes. However, when the apply is done nothing has changed. Checking the resource on AWS console shows it is still at the default value of 5. Re-running the apply or plan show that it wants to apply the change again.

Expected Behavior

The applied value is changed on the AWS resource.

Actual Behavior

Nothing

Relevant Error/Panic Output Snippet

No error or panic received.  Just no change takes place.

Terraform Configuration Files

The following shows up for plan or apply but actually applying the change doesn't do anything.

# module.dmstask_websites_oracle_prod_to_warehouse_oracle_dev_issues.aws_dms_replication_task.task will be updated in-place
  ~ resource "aws_dms_replication_task" "task" {
        id                        = "websites-oracle-prod-to-warehouse-oracle-dev-issues"
      ~ replication_task_settings = jsonencode(
          ~ {
              ~ ValidationSettings                  = {
                  ~ RecordFailureDelayInMinutes      = 5 -> 30
                    # (14 unchanged attributes hidden)
                }
                # (14 unchanged attributes hidden)
            }
        )
        tags                      = {}
        # (10 unchanged attributes hidden)
    }

Steps to Reproduce

Add parameter to existing replication_task_settings and apply

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

@slords slords added bug Addresses a defect in current functionality. needs-triage Waiting for first response or review from a maintainer. labels Jun 23, 2023
@github-actions github-actions bot added the service/dms Issues and PRs that pertain to the dms service. label Jun 23, 2023
@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • 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.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@justinretzolk
Copy link
Member

Hey @slords 👋 Thank you for taking the time to raise this! So that we have the information necessary to look into this, can you supply a sample Terraform configuration as well as debug logs (redacted as needed)?

@justinretzolk justinretzolk added waiting-response Maintainers are waiting on response from community or contributor. and removed needs-triage Waiting for first response or review from a maintainer. labels Jun 23, 2023
@github-actions github-actions bot removed the waiting-response Maintainers are waiting on response from community or contributor. label Jun 23, 2023
@nikoshet
Copy link
Contributor

nikoshet commented Nov 21, 2023

Hello @justinretzolk, i have the same issue. Below is a sample Terraform configuration:

resource "aws_dms_replication_task" "my_replication_task" {

  replication_instance_arn  = aws_dms_replication_instance.my_replication_instance.replication_instance_arn
  replication_task_id       = "my-replication-task-with-validation"
  source_endpoint_arn       = aws_dms_endpoint.my_postgresql_db_source.endpoint_arn
  table_mappings            = jsonencode(var.my_table_mappings)
  target_endpoint_arn       = aws_dms_endpoint.my_postgresql_db_target.endpoint_arn
  replication_task_settings = jsonencode(local.my_validation_task_settings)

  migration_type         = "full-load-and-cdc"
  start_replication_task = false
}

locals{
  my_validation_task_settings = {
    "ValidationSettings" : {
      "EnableValidation" : true,
      "ThreadCount" : 5,
      "PartitionSize" : 10000,
      "ValidationOnly" : false,
      "SkipLobColumns" : false,
      "TableFailureMaxCount": 10,
      "FailureMaxCount": 100
      "RecordFailureDelayInMinutes": 1,
    }
  }
}

Terraform will perform the following actions:

  # aws_dms_replication_task.my_replication_task will be updated in-place
  ~ resource "aws_dms_replication_task" "my_replication_task" {
        id                        = "my-replication-task-with-validation"
      ~ replication_task_settings = jsonencode(
          ~ {
              ~ ValidationSettings                  = {
                  - HandleCollationDiff              = false
                  - MaxKeyColumnSize                 = 8096
                  ~ RecordFailureDelayInMinutes      = 5 -> 1
                  - RecordFailureDelayLimitInMinutes = 0
                  - RecordSuspendDelayInMinutes      = 30
                  - ValidationMode                   = "ROW_LEVEL"
                  - ValidationPartialLobSize         = 0
                  - ValidationQueryCdcDelaySeconds   = 0
                    # (7 unchanged attributes hidden)
                }
            }
        )
}

After TF apply nothing is changed.

AWS Provider version: 5.25.0

Copy link

This functionality has been released in v5.32.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@slords
Copy link
Author

slords commented Jan 26, 2024

This still isn't fixed. I'm currently using v5.34.0 of the AWS Terraform Provider:

Installing hashicorp/aws v5.34.0...

And Terraform is saying that it is going to change the value:

          ~ ValidationSettings                  = {
              ~ RecordFailureDelayInMinutes      = 5 -> 30
                # (14 unchanged attributes hidden)
            }

However, checking the task after the fact it is still sitting at 5 minutes. And re-running the apply again tries to update the setting just like the first time through.

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 Feb 26, 2024
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/dms Issues and PRs that pertain to the dms service.
Projects
None yet
3 participants