-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Can't create secondary aurora-postgresql aws_rds_cluster inside an aws_rds_global_cluster when the source/primary cluster has storage encryption enabled #13715
Comments
I also ran into this issue. I worked through it with the aws-cli and figured out the The provider is taking the wrong path and just submitting So take out the |
I'm running into a similar issue trying to create a global cluster with encryption. I get a presigned URL error when I specify only the global cluster ID and exclude the replication source. Can't seem to find anyone in the same position. |
…nt creation issue when global_cluster_identifier and replication_source_identifier are both configured Reference: #13715 After adding new acceptance testing with previous resource logic: ``` TestAccAWSRDSCluster_GlobalClusterIdentifier_ReplicationSourceIdentifier: testing.go:684: Step 0 error: errors during apply: Error: error creating RDS cluster: InvalidDBClusterStateFault: Source cluster arn:aws:rds:us-west-2:--OMITTED--:cluster:tf-acc-test-728428284997379009-primary doesn't have binlogs enabled. status code: 400, request id: 36e4f744-9080-4a6c-adca-fb2fc660d66e ``` After consolidating `CreateDBCluster` logic (allowing both `global_cluster_identifier` and `replication_source_identifier` to be set in the same call): ``` TestAccAWSRDSCluster_GlobalClusterIdentifier_ReplicationSourceIdentifier: testing.go:684: Step 0 error: errors during apply: Error: error creating RDS cluster: InvalidParameterCombination: Value for replicationSourceIdentifier should not be specified for db cluster that is a member of global cluster status code: 400, request id: f8558f28-14d1-49b3-9d94-1a607b1b689d ``` Opt to conditionalize the creation handling for this situation rather than return an error for the conflicting arguments since the existing configuration may be prevalent and the end result is the same. Document `ignore_changes`. Output from acceptance testing (omitting failures from #14384): ``` --- PASS: TestAccAWSRDSCluster_AvailabilityZones (138.84s) --- PASS: TestAccAWSRDSCluster_BacktrackWindow (166.46s) --- PASS: TestAccAWSRDSCluster_backupsUpdate (161.00s) --- PASS: TestAccAWSRDSCluster_basic (143.12s) --- PASS: TestAccAWSRDSCluster_ClusterIdentifierPrefix (137.99s) --- PASS: TestAccAWSRDSCluster_copyTagsToSnapshot (205.95s) --- PASS: TestAccAWSRDSCluster_DbSubnetGroupName (159.06s) --- PASS: TestAccAWSRDSCluster_DeletionProtection (160.99s) --- PASS: TestAccAWSRDSCluster_EnabledCloudwatchLogsExports (341.44s) --- PASS: TestAccAWSRDSCluster_EnableHttpEndpoint (356.65s) --- PASS: TestAccAWSRDSCluster_encrypted (121.15s) --- PASS: TestAccAWSRDSCluster_EngineMode (432.72s) --- PASS: TestAccAWSRDSCluster_EngineMode_Global (139.87s) --- PASS: TestAccAWSRDSCluster_EngineMode_Multimaster (139.86s) --- PASS: TestAccAWSRDSCluster_EngineMode_ParallelQuery (137.74s) --- PASS: TestAccAWSRDSCluster_EngineVersion (425.30s) --- PASS: TestAccAWSRDSCluster_EngineVersionWithPrimaryInstance (1107.25s) --- PASS: TestAccAWSRDSCluster_generatedName (126.84s) --- PASS: TestAccAWSRDSCluster_GlobalClusterIdentifier_EngineMode_Global (189.88s) --- PASS: TestAccAWSRDSCluster_GlobalClusterIdentifier_EngineMode_Global_Add (163.70s) --- PASS: TestAccAWSRDSCluster_GlobalClusterIdentifier_EngineMode_Global_Remove (162.57s) --- PASS: TestAccAWSRDSCluster_GlobalClusterIdentifier_EngineMode_Global_Update (172.66s) --- PASS: TestAccAWSRDSCluster_GlobalClusterIdentifier_EngineMode_Provisioned (157.23s) --- PASS: TestAccAWSRDSCluster_GlobalClusterIdentifier_PrimarySecondaryClusters (1768.71s) --- PASS: TestAccAWSRDSCluster_GlobalClusterIdentifier_ReplicationSourceIdentifier (1747.31s) --- PASS: TestAccAWSRDSCluster_iamAuth (127.32s) --- PASS: TestAccAWSRDSCluster_kmsKey (161.41s) --- PASS: TestAccAWSRDSCluster_missingUserNameCausesError (4.87s) --- PASS: TestAccAWSRDSCluster_Port (253.12s) --- PASS: TestAccAWSRDSCluster_ScalingConfiguration (386.00s) --- PASS: TestAccAWSRDSCluster_ScalingConfiguration_DefaultMinCapacity (379.58s) --- PASS: TestAccAWSRDSCluster_SnapshotIdentifier (371.73s) --- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_DeletionProtection (409.17s) --- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_EncryptedRestore (358.98s) --- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_EngineMode_ParallelQuery (439.76s) --- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_EngineMode_Provisioned (333.04s) --- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_EngineVersion_Different (359.99s) --- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_EngineVersion_Equal (337.24s) --- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_MasterPassword (347.53s) --- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_MasterUsername (381.60s) --- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_PreferredBackupWindow (379.98s) --- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_PreferredMaintenanceWindow (363.89s) --- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_Tags (381.05s) --- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_VpcSecurityGroupIds (362.04s) --- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_VpcSecurityGroupIds_Tags (369.15s) --- PASS: TestAccAWSRDSCluster_Tags (136.51s) --- PASS: TestAccAWSRDSCluster_takeFinalSnapshot (207.97s) --- PASS: TestAccAWSRDSCluster_updateIamRoles (180.35s) ```
Fix submitted (#14490) to prevent the confusing error on creation, however we will document the recommendation that resource "aws_rds_cluster" "secondary" {
global_cluster_identifier = aws_global_cluster.example.id
# ... other configuration ...
lifecycle {
ignore_changes = [replication_source_identifier]
}
} |
…nt creation issue when global_cluster_identifier and replication_source_identifier are both configured (#14490) Reference: #13715 After adding new acceptance testing with previous resource logic: ``` TestAccAWSRDSCluster_GlobalClusterIdentifier_ReplicationSourceIdentifier: testing.go:684: Step 0 error: errors during apply: Error: error creating RDS cluster: InvalidDBClusterStateFault: Source cluster arn:aws:rds:us-west-2:--OMITTED--:cluster:tf-acc-test-728428284997379009-primary doesn't have binlogs enabled. status code: 400, request id: 36e4f744-9080-4a6c-adca-fb2fc660d66e ``` After consolidating `CreateDBCluster` logic (allowing both `global_cluster_identifier` and `replication_source_identifier` to be set in the same call): ``` TestAccAWSRDSCluster_GlobalClusterIdentifier_ReplicationSourceIdentifier: testing.go:684: Step 0 error: errors during apply: Error: error creating RDS cluster: InvalidParameterCombination: Value for replicationSourceIdentifier should not be specified for db cluster that is a member of global cluster status code: 400, request id: f8558f28-14d1-49b3-9d94-1a607b1b689d ``` Opt to conditionalize the creation handling for this situation rather than return an error for the conflicting arguments since the existing configuration may be prevalent and the end result is the same. Document `ignore_changes`. Output from acceptance testing (omitting failures from #14384): ``` --- PASS: TestAccAWSRDSCluster_AvailabilityZones (138.84s) --- PASS: TestAccAWSRDSCluster_BacktrackWindow (166.46s) --- PASS: TestAccAWSRDSCluster_backupsUpdate (161.00s) --- PASS: TestAccAWSRDSCluster_basic (143.12s) --- PASS: TestAccAWSRDSCluster_ClusterIdentifierPrefix (137.99s) --- PASS: TestAccAWSRDSCluster_copyTagsToSnapshot (205.95s) --- PASS: TestAccAWSRDSCluster_DbSubnetGroupName (159.06s) --- PASS: TestAccAWSRDSCluster_DeletionProtection (160.99s) --- PASS: TestAccAWSRDSCluster_EnabledCloudwatchLogsExports (341.44s) --- PASS: TestAccAWSRDSCluster_EnableHttpEndpoint (356.65s) --- PASS: TestAccAWSRDSCluster_encrypted (121.15s) --- PASS: TestAccAWSRDSCluster_EngineMode (432.72s) --- PASS: TestAccAWSRDSCluster_EngineMode_Global (139.87s) --- PASS: TestAccAWSRDSCluster_EngineMode_Multimaster (139.86s) --- PASS: TestAccAWSRDSCluster_EngineMode_ParallelQuery (137.74s) --- PASS: TestAccAWSRDSCluster_EngineVersion (425.30s) --- PASS: TestAccAWSRDSCluster_EngineVersionWithPrimaryInstance (1107.25s) --- PASS: TestAccAWSRDSCluster_generatedName (126.84s) --- PASS: TestAccAWSRDSCluster_GlobalClusterIdentifier_EngineMode_Global (189.88s) --- PASS: TestAccAWSRDSCluster_GlobalClusterIdentifier_EngineMode_Global_Add (163.70s) --- PASS: TestAccAWSRDSCluster_GlobalClusterIdentifier_EngineMode_Global_Remove (162.57s) --- PASS: TestAccAWSRDSCluster_GlobalClusterIdentifier_EngineMode_Global_Update (172.66s) --- PASS: TestAccAWSRDSCluster_GlobalClusterIdentifier_EngineMode_Provisioned (157.23s) --- PASS: TestAccAWSRDSCluster_GlobalClusterIdentifier_PrimarySecondaryClusters (1768.71s) --- PASS: TestAccAWSRDSCluster_GlobalClusterIdentifier_ReplicationSourceIdentifier (1747.31s) --- PASS: TestAccAWSRDSCluster_iamAuth (127.32s) --- PASS: TestAccAWSRDSCluster_kmsKey (161.41s) --- PASS: TestAccAWSRDSCluster_missingUserNameCausesError (4.87s) --- PASS: TestAccAWSRDSCluster_Port (253.12s) --- PASS: TestAccAWSRDSCluster_ScalingConfiguration (386.00s) --- PASS: TestAccAWSRDSCluster_ScalingConfiguration_DefaultMinCapacity (379.58s) --- PASS: TestAccAWSRDSCluster_SnapshotIdentifier (371.73s) --- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_DeletionProtection (409.17s) --- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_EncryptedRestore (358.98s) --- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_EngineMode_ParallelQuery (439.76s) --- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_EngineMode_Provisioned (333.04s) --- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_EngineVersion_Different (359.99s) --- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_EngineVersion_Equal (337.24s) --- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_MasterPassword (347.53s) --- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_MasterUsername (381.60s) --- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_PreferredBackupWindow (379.98s) --- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_PreferredMaintenanceWindow (363.89s) --- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_Tags (381.05s) --- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_VpcSecurityGroupIds (362.04s) --- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_VpcSecurityGroupIds_Tags (369.15s) --- PASS: TestAccAWSRDSCluster_Tags (136.51s) --- PASS: TestAccAWSRDSCluster_takeFinalSnapshot (207.97s) --- PASS: TestAccAWSRDSCluster_updateIamRoles (180.35s) ```
The above mentioned fix has been merged and will release with version 3.1.0 of the Terraform AWS Provider, likely later today. 👍 |
This has been released in version 3.1.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 for triage. Thanks! |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Community Note
Terraform Version
Terraform v0.11.13
AWS Provider v2.65.0
Affected Resource(s)
Terraform Configuration Files
Debug Output
Debug Output gist.
Expected Behavior
Secondary aws_rds_cluster is created in a different region, associated with the parent aws_rds_global_cluster, replicating the primary aws_rds_cluster, and encrypted with the destination region's KMS key
Actual Behavior
I get an error that the source cluster "doesn't have binlogs enabled". This doesn't really make any sense since binlogs are a MySql thing AFAIK and I'm creating a postgresql cluster
Steps to Reproduce
terraform apply
the above moduleThe text was updated successfully, but these errors were encountered: