Skip to content

Perpetual diff with aws_dms_replication_task #19883

Closed
@mattburgess

Description

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.15.5
on darwin_amd64
+ provider registry.terraform.io/hashicorp/aws v3.44.0
+ provider registry.terraform.io/hashicorp/random v3.1.0

Affected Resource(s)

  • aws_dms_replication_task

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

resource "aws_dms_replication_task" "test" {
  migration_type            = "full-load-and-cdc"
  replication_instance_arn  = aws_dms_replication_instance.test.replication_instance_arn
  replication_task_id       = "test"
  replication_task_settings = file("dms-task-settings.json")
  source_endpoint_arn       = aws_dms_endpoint.source.endpoint_arn
  target_endpoint_arn       = aws_dms_endpoint.target.endpoint_arn
  table_mappings            = file("dms-table-mappings.json")
}

The dms-task-settings.json is also pertinent; it's simply all of DMS' defaults, written with the intent of producing a zero-diff:

{
    "BeforeImageSettings": null,
    "ChangeProcessingDdlHandlingPolicy": {
        "HandleSourceTableAltered": true,
        "HandleSourceTableDropped": true,
        "HandleSourceTableTruncated": true
    },
    "ChangeProcessingTuning": {
        "BatchApplyMemoryLimit": 500,
        "BatchApplyPreserveTransaction": true,
        "BatchApplyTimeoutMax": 30,
        "BatchApplyTimeoutMin": 1,
        "BatchSplitSize": 0,
        "CommitTimeout": 1,
        "MemoryKeepTime": 60,
        "MemoryLimitTotal": 1024,
        "MinTransactionSize": 1000,
        "StatementCacheSize": 50
    },
    "CharacterSetSettings": null,
    "ControlTablesSettings": {
        "ControlSchema": "",
        "FullLoadExceptionTableEnabled": false,
        "HistoryTableEnabled": false,
        "HistoryTimeslotInMinutes": 5,
        "StatusTableEnabled": false,
        "SuspendedTablesTableEnabled": false
    },
    "ErrorBehavior": {
        "ApplyErrorDeletePolicy": "IGNORE_RECORD",
        "ApplyErrorEscalationCount": 0,
        "ApplyErrorEscalationPolicy": "LOG_ERROR",
        "ApplyErrorFailOnTruncationDdl": false,
        "ApplyErrorInsertPolicy": "LOG_ERROR",
        "ApplyErrorUpdatePolicy": "LOG_ERROR",
        "DataErrorEscalationCount": 0,
        "DataErrorEscalationPolicy": "SUSPEND_TABLE",
        "DataErrorPolicy": "LOG_ERROR",
        "DataTruncationErrorPolicy": "LOG_ERROR",
        "FailOnNoTablesCaptured": true,
        "FailOnTransactionConsistencyBreached": false,
        "FullLoadIgnoreConflicts": true,
        "RecoverableErrorCount": -1,
        "RecoverableErrorInterval": 5,
        "RecoverableErrorStopRetryAfterThrottlingMax": true,
        "RecoverableErrorThrottling": true,
        "RecoverableErrorThrottlingMax": 1800,
        "TableErrorEscalationCount": 0,
        "TableErrorEscalationPolicy": "STOP_TASK",
        "TableErrorPolicy": "SUSPEND_TABLE"
    },
    "FailTaskWhenCleanTaskResourceFailed": false,
    "FullLoadSettings": {
        "CommitRate": 10000,
        "CreatePkAfterFullLoad": false,
        "MaxFullLoadSubTasks": 8,
        "StopTaskCachedChangesApplied": false,
        "StopTaskCachedChangesNotApplied": false,
        "TargetTablePrepMode": "DROP_AND_CREATE",
        "TransactionConsistencyTimeout": 600
    },
    "Logging": {
        "EnableLogging": false,
        "LogComponents": [
            {
                "Id": "DATA_STRUCTURE",
                "Severity": "LOGGER_SEVERITY_DEFAULT"
            },
            {
                "Id": "COMMUNICATION",
                "Severity": "LOGGER_SEVERITY_DEFAULT"
            },
            {
                "Id": "IO",
                "Severity": "LOGGER_SEVERITY_DEFAULT"
            },
            {
                "Id": "COMMON",
                "Severity": "LOGGER_SEVERITY_DEFAULT"
            },
            {
                "Id": "FILE_FACTORY",
                "Severity": "LOGGER_SEVERITY_DEFAULT"
            },
            {
                "Id": "FILE_TRANSFER",
                "Severity": "LOGGER_SEVERITY_DEFAULT"
            },
            {
                "Id": "REST_SERVER",
                "Severity": "LOGGER_SEVERITY_DEFAULT"
            },
            {
                "Id": "ADDONS",
                "Severity": "LOGGER_SEVERITY_DEFAULT"
            },
            {
                "Id": "TARGET_LOAD",
                "Severity": "LOGGER_SEVERITY_DEFAULT"
            },
            {
                "Id": "TARGET_APPLY",
                "Severity": "LOGGER_SEVERITY_DEFAULT"
            },
            {
                "Id": "SOURCE_UNLOAD",
                "Severity": "LOGGER_SEVERITY_DEFAULT"
            },
            {
                "Id": "SOURCE_CAPTURE",
                "Severity": "LOGGER_SEVERITY_DEFAULT"
            },
            {
                "Id": "TRANSFORMATION",
                "Severity": "LOGGER_SEVERITY_DEFAULT"
            },
            {
                "Id": "SORTER",
                "Severity": "LOGGER_SEVERITY_DEFAULT"
            },
            {
                "Id": "TASK_MANAGER",
                "Severity": "LOGGER_SEVERITY_DEFAULT"
            },
            {
                "Id": "TABLES_MANAGER",
                "Severity": "LOGGER_SEVERITY_DEFAULT"
            },
            {
                "Id": "METADATA_MANAGER",
                "Severity": "LOGGER_SEVERITY_DEFAULT"
            },
            {
                "Id": "PERFORMANCE",
                "Severity": "LOGGER_SEVERITY_DEFAULT"
            },
            {
                "Id": "VALIDATOR_EXT",
                "Severity": "LOGGER_SEVERITY_DEFAULT"
            }
        ]
    },
    "LoopbackPreventionSettings": null,
    "PostProcessingRules": null,
    "StreamBufferSettings": {
        "CtrlStreamBufferSizeInMB": 5,
        "StreamBufferCount": 3,
        "StreamBufferSizeInMB": 8
    },
    "TargetMetadata": {
        "BatchApplyEnabled": false,
        "FullLobMode": false,
        "InlineLobMaxSize": 0,
        "LimitedSizeLobMode": true,
        "LoadMaxFileSize": 0,
        "LobChunkSize": 64,
        "LobMaxSize": 32,
        "ParallelApplyBufferSize": 0,
        "ParallelApplyQueuesPerThread": 0,
        "ParallelApplyThreads": 0,
        "ParallelLoadBufferSize": 0,
        "ParallelLoadQueuesPerThread": 0,
        "ParallelLoadThreads": 0,
        "SupportLobs": true,
        "TargetSchema": "",
        "TaskRecoveryTableEnabled": false
    }
}

Debug Output

N/A

Panic Output

N/A

Expected Behavior

Running terraform plan immediately after applying the above resource should show no diffs.

Actual Behavior

terraform plan shows diffs in the replication_task_settings.Logging.LogComponents:

  # aws_dms_replication_task.test will be updated in-place
  ~ resource "aws_dms_replication_task" "test" {
        id                        = "test"
      ~ replication_task_settings = jsonencode(
          ~ {
              ~ Logging                             = {
                  ~ LogComponents = [
                      ~ {
                          ~ Id       = "TRANSFORMATION" -> "DATA_STRUCTURE"
                            # (1 unchanged element hidden)
                        },
                      ~ {
                          ~ Id       = "SOURCE_UNLOAD" -> "COMMUNICATION"
                            # (1 unchanged element hidden)
                        },
                        {
                            Id       = "IO"
                            Severity = "LOGGER_SEVERITY_DEFAULT"
                        },
                      + {
                          + Id       = "COMMON"
                          + Severity = "LOGGER_SEVERITY_DEFAULT"
                        },
                      + {
                          + Id       = "FILE_FACTORY"
                          + Severity = "LOGGER_SEVERITY_DEFAULT"
                        },
                      + {
                          + Id       = "FILE_TRANSFER"
                          + Severity = "LOGGER_SEVERITY_DEFAULT"
                        },
                      + {
                          + Id       = "REST_SERVER"
                          + Severity = "LOGGER_SEVERITY_DEFAULT"
                        },
                      + {
                          + Id       = "ADDONS"
                          + Severity = "LOGGER_SEVERITY_DEFAULT"
                        },
                        {
                            Id       = "TARGET_LOAD"
                            Severity = "LOGGER_SEVERITY_DEFAULT"
                        },
                      ~ {
                          ~ Id       = "PERFORMANCE" -> "TARGET_APPLY"
                            # (1 unchanged element hidden)
                        },
                      + {
                          + Id       = "SOURCE_UNLOAD"
                          + Severity = "LOGGER_SEVERITY_DEFAULT"
                        },
                        {
                            Id       = "SOURCE_CAPTURE"
                            Severity = "LOGGER_SEVERITY_DEFAULT"
                        },
                      + {
                          + Id       = "TRANSFORMATION"
                          + Severity = "LOGGER_SEVERITY_DEFAULT"
                        },
                        {
                            Id       = "SORTER"
                            Severity = "LOGGER_SEVERITY_DEFAULT"
                        },
                      - {
                          - Id       = "REST_SERVER"
                          - Severity = "LOGGER_SEVERITY_DEFAULT"
                        },
                      - {
                          - Id       = "VALIDATOR_EXT"
                          - Severity = "LOGGER_SEVERITY_DEFAULT"
                        },
                      - {
                          - Id       = "TARGET_APPLY"
                          - Severity = "LOGGER_SEVERITY_DEFAULT"
                        },
                        {
                            Id       = "TASK_MANAGER"
                            Severity = "LOGGER_SEVERITY_DEFAULT"
                        },
                        # (1 unchanged element hidden)
                        {
                            Id       = "METADATA_MANAGER"
                            Severity = "LOGGER_SEVERITY_DEFAULT"
                        },
                      ~ {
                          ~ Id       = "FILE_FACTORY" -> "PERFORMANCE"
                            # (1 unchanged element hidden)
                        },
                      ~ {
                          ~ Id       = "COMMON" -> "VALIDATOR_EXT"
                            # (1 unchanged element hidden)
                        },
                      - {
                          - Id       = "ADDONS"
                          - Severity = "LOGGER_SEVERITY_DEFAULT"
                        },
                      - {
                          - Id       = "DATA_STRUCTURE"
                          - Severity = "LOGGER_SEVERITY_DEFAULT"
                        },
                      - {
                          - Id       = "COMMUNICATION"
                          - Severity = "LOGGER_SEVERITY_DEFAULT"
                        },
                      - {
                          - Id       = "FILE_TRANSFER"
                          - Severity = "LOGGER_SEVERITY_DEFAULT"
                        },
                    ]
                    # (1 unchanged element hidden)
                }
                # (12 unchanged elements hidden)
            }
        )
        # (8 unchanged attributes hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

Steps to Reproduce

  1. terraform apply
  2. terraform plan

Important Factoids

References

Metadata

Assignees

No one assigned

    Labels

    bugAddresses a defect in current functionality.service/dmsIssues and PRs that pertain to the dms service.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions