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

resource/aws_rds_cluster: Various enhancements, bug fixes #17111

Conversation

mantoine96
Copy link
Contributor

@mantoine96 mantoine96 commented Jan 14, 2021

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment 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 pull request followers and do not help prioritize the request

Relates to #14709
Closes #18820
Closes #17357
Closes #17561
Closes #20109
Closes #21072
Closes #9307
Closes #14457

Release note for CHANGELOG:

* resource/aws_rds_cluster: Add `db_instance_parameter_group_name` argument for aws_rds_cluster

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSRDSCluster_AllowMajorVersionUpgradeWithCustomParameterGroups'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSRDSCluster_AllowMajorVersionUpgradeWithCustomParameterGroups -timeout 120m
=== RUN   TestAccAWSRDSCluster_AllowMajorVersionUpgradeWithCustomParameterGroups
=== PAUSE TestAccAWSRDSCluster_AllowMajorVersionUpgradeWithCustomParameterGroups
=== CONT  TestAccAWSRDSCluster_AllowMajorVersionUpgradeWithCustomParameterGroups

--- PASS: TestAccAWSRDSCluster_AllowMajorVersionUpgradeWithCustomParameterGroups (1424.74s)
PASS
ok      github.com/terraform-providers/terraform-provider-aws/aws       1426.411s

This PR adds the db_instance_parameter_group_name argument for aws_rds_cluster (see ModifyDBCluster documentation). This parameter is required to perform major version upgrades. Not having this parameter set results in this error:

Error: Failed to modify RDS Cluster (my-cluster): InvalidParameterCombination: The current DB instance parameter group my-cluster-instance-pg is custom. You must explicitly specify a new DB instance parameter group, either default or custom, for the engine version upgrade.
        status code: 400, request id: xxxxx-xxxxxx-xxxxx-xxxxx

@ghost ghost added size/XS Managed by automation to categorize the size of a PR. service/rds Issues and PRs that pertain to the rds service. labels Jan 14, 2021
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Jan 14, 2021
@ghost ghost added size/M Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. documentation Introduces or discusses updates to documentation. and removed size/XS Managed by automation to categorize the size of a PR. labels Jan 14, 2021
@mantoine96 mantoine96 force-pushed the f-rds_cluster-db_instance_parameter_group_name branch from 7f74515 to 553ea51 Compare January 14, 2021 16:46
@mantoine96 mantoine96 marked this pull request as ready for review January 14, 2021 17:35
@mantoine96 mantoine96 requested a review from a team as a code owner January 14, 2021 17:35
Base automatically changed from master to main January 23, 2021 01:00
@YakDriver YakDriver self-assigned this Apr 13, 2021
@YakDriver YakDriver removed the needs-triage Waiting for first response or review from a maintainer. label Apr 13, 2021
@YakDriver YakDriver force-pushed the f-rds_cluster-db_instance_parameter_group_name branch from 553ea51 to 1ad2a2c Compare April 15, 2021 19:58
@mantoine96
Copy link
Contributor Author

Hey @YakDriver

Is there anything I can do to help this get merged?

Thanks!

@svenedge
Copy link

svenedge commented Sep 7, 2021

See also #17357 and #18820.

@YakDriver YakDriver force-pushed the f-rds_cluster-db_instance_parameter_group_name branch from d048448 to 581b594 Compare October 13, 2021 19:54
@github-actions github-actions bot added size/L Managed by automation to categorize the size of a PR. and removed size/M Managed by automation to categorize the size of a PR. labels Oct 13, 2021
YakDriver and others added 4 commits October 13, 2021 17:05
Enabling/disabling IAM auth on an existing RDS cluster led to a fail of
terraform as 'configuring-iam-database-auth' was not an expected pending
state.

I also identified another missing pending state: 'renaming'.

Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
@github-actions github-actions bot added size/XL Managed by automation to categorize the size of a PR. and removed size/L Managed by automation to categorize the size of a PR. labels Oct 13, 2021
Copy link
Member

@YakDriver YakDriver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 🎉

Output from acceptance tests (us-west-2): (failure is unrelated to these changes, see #13391)

--- FAIL: TestAccAWSRDSCluster_s3Restore (1528.12s)
--- PASS: TestAccAWSRDSCluster_AllowMajorVersionUpgrade (1435.43s)
--- PASS: TestAccAWSRDSCluster_AllowMajorVersionUpgradeWithCustomParameters (1709.87s)
--- PASS: TestAccAWSRDSCluster_AllowMajorVersionUpgradeWithCustomParametersApplyImm (1950.04s)
--- PASS: TestAccAWSRDSCluster_AvailabilityZones (160.35s)
--- PASS: TestAccAWSRDSCluster_BacktrackWindow (253.40s)
--- PASS: TestAccAWSRDSCluster_backupsUpdate (198.32s)
--- PASS: TestAccAWSRDSCluster_basic (136.06s)
--- PASS: TestAccAWSRDSCluster_ClusterIdentifierPrefix (168.57s)
--- PASS: TestAccAWSRDSCluster_copyTagsToSnapshot (253.56s)
--- PASS: TestAccAWSRDSCluster_DbSubnetGroupName (196.50s)
--- PASS: TestAccAWSRDSCluster_DeletionProtection (206.23s)
--- PASS: TestAccAWSRDSCluster_EnabledCloudwatchLogsExports_MySQL (236.36s)
--- PASS: TestAccAWSRDSCluster_EnabledCloudwatchLogsExports_Postgresql (141.06s)
--- PASS: TestAccAWSRDSCluster_EnableHttpEndpoint (388.86s)
--- PASS: TestAccAWSRDSCluster_encrypted (170.93s)
--- PASS: TestAccAWSRDSCluster_EngineMode (458.91s)
--- PASS: TestAccAWSRDSCluster_EngineMode_Global (184.05s)
--- PASS: TestAccAWSRDSCluster_EngineMode_Multimaster (172.05s)
--- PASS: TestAccAWSRDSCluster_EngineMode_ParallelQuery (182.60s)
--- PASS: TestAccAWSRDSCluster_EngineVersion (455.52s)
--- PASS: TestAccAWSRDSCluster_EngineVersionWithPrimaryInstance (1173.08s)
--- PASS: TestAccAWSRDSCluster_generatedName (137.44s)
--- PASS: TestAccAWSRDSCluster_GlobalClusterIdentifier_EngineMode_Global (176.88s)
--- PASS: TestAccAWSRDSCluster_GlobalClusterIdentifier_EngineMode_Global_Add (195.91s)
--- PASS: TestAccAWSRDSCluster_GlobalClusterIdentifier_EngineMode_Global_Remove (195.92s)
--- PASS: TestAccAWSRDSCluster_GlobalClusterIdentifier_EngineMode_Global_Update (156.34s)
--- PASS: TestAccAWSRDSCluster_GlobalClusterIdentifier_EngineMode_Provisioned (151.53s)
--- PASS: TestAccAWSRDSCluster_GlobalClusterIdentifier_PrimarySecondaryClusters (1915.62s)
--- PASS: TestAccAWSRDSCluster_GlobalClusterIdentifier_ReplicationSourceIdentifier (1844.23s)
--- PASS: TestAccAWSRDSCluster_GlobalClusterIdentifier_SecondaryClustersWriteForwarding (2317.30s)
--- PASS: TestAccAWSRDSCluster_iamAuth (196.60s)
--- PASS: TestAccAWSRDSCluster_kmsKey (155.80s)
--- PASS: TestAccAWSRDSCluster_missingUserNameCausesError (5.31s)
--- PASS: TestAccAWSRDSCluster_OnlyMajorVersion (750.33s)
--- PASS: TestAccAWSRDSCluster_PointInTimeRestore (376.86s)
--- PASS: TestAccAWSRDSCluster_PointInTimeRestore_EnabledCloudwatchLogsExports (397.18s)
--- PASS: TestAccAWSRDSCluster_Port (187.67s)
--- PASS: TestAccAWSRDSCluster_ReplicationSourceIdentifier_KmsKeyId (1585.88s)
--- PASS: TestAccAWSRDSCluster_ScalingConfiguration (389.12s)
--- PASS: TestAccAWSRDSCluster_ScalingConfiguration_DefaultMinCapacity (376.26s)
--- PASS: TestAccAWSRDSCluster_SnapshotIdentifier (399.55s)
--- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_DeletionProtection (424.44s)
--- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_EncryptedRestore (557.87s)
--- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_EngineMode_ParallelQuery (489.30s)
--- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_EngineMode_Provisioned (408.71s)
--- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_EngineVersion_Different (379.73s)
--- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_EngineVersion_Equal (462.33s)
--- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_KmsKeyId (429.57s)
--- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_MasterPassword (387.70s)
--- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_MasterUsername (444.47s)
--- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_PreferredBackupWindow (521.88s)
--- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_PreferredMaintenanceWindow (513.77s)
--- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_Tags (454.31s)
--- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_VpcSecurityGroupIds (452.68s)
--- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_VpcSecurityGroupIds_Tags (451.16s)
--- PASS: TestAccAWSRDSCluster_Tags (150.21s)
--- PASS: TestAccAWSRDSCluster_takeFinalSnapshot (180.44s)
--- PASS: TestAccAWSRDSCluster_updateIamRoles (201.98s)
--- PASS: TestAccAWSRDSClusterInstance_az (817.60s)
--- PASS: TestAccAWSRDSClusterInstance_basic (1463.88s)
--- PASS: TestAccAWSRDSClusterInstance_CACertificateIdentifier (730.69s)
--- PASS: TestAccAWSRDSClusterInstance_CopyTagsToSnapshot (762.97s)
--- PASS: TestAccAWSRDSClusterInstance_disappears (790.84s)
--- PASS: TestAccAWSRDSClusterInstance_generatedName (768.68s)
--- PASS: TestAccAWSRDSClusterInstance_isAlreadyBeingDeleted (749.96s)
--- PASS: TestAccAWSRDSClusterInstance_kmsKey (816.43s)
--- PASS: TestAccAWSRDSClusterInstance_MonitoringInterval (1398.68s)
--- PASS: TestAccAWSRDSClusterInstance_MonitoringRoleArn_EnabledToDisabled (946.91s)
--- PASS: TestAccAWSRDSClusterInstance_MonitoringRoleArn_EnabledToRemoved (1040.23s)
--- PASS: TestAccAWSRDSClusterInstance_MonitoringRoleArn_RemovedToEnabled (902.68s)
--- PASS: TestAccAWSRDSClusterInstance_namePrefix (738.90s)
--- PASS: TestAccAWSRDSClusterInstance_PerformanceInsightsEnabled_AuroraMysql1 (793.09s)
--- PASS: TestAccAWSRDSClusterInstance_PerformanceInsightsEnabled_AuroraMysql2 (834.40s)
--- PASS: TestAccAWSRDSClusterInstance_PerformanceInsightsEnabled_AuroraPostgresql (762.55s)
--- PASS: TestAccAWSRDSClusterInstance_PerformanceInsightsKmsKeyId_AuroraMysql1 (835.51s)
--- PASS: TestAccAWSRDSClusterInstance_PerformanceInsightsKmsKeyId_AuroraMysql1_DefaultKeyToCustomKey (782.13s)
--- PASS: TestAccAWSRDSClusterInstance_PerformanceInsightsKmsKeyId_AuroraMysql2 (803.76s)
--- PASS: TestAccAWSRDSClusterInstance_PerformanceInsightsKmsKeyId_AuroraMysql2_DefaultKeyToCustomKey (814.26s)
--- PASS: TestAccAWSRDSClusterInstance_PerformanceInsightsKmsKeyId_AuroraPostgresql (804.64s)
--- PASS: TestAccAWSRDSClusterInstance_PerformanceInsightsKmsKeyId_AuroraPostgresql_DefaultKeyToCustomKey (783.19s)
--- PASS: TestAccAWSRDSClusterInstance_PerformanceInsightsRetentionPeriod (1032.06s)
--- PASS: TestAccAWSRDSClusterInstance_PubliclyAccessible (779.78s)
--- SKIP: TestAccAWSRDSCluster_SnapshotIdentifier_EngineMode_Serverless (0.00s)

Output from acceptance tests (GovCloud):

--- FAIL: TestAccAWSRDSCluster_s3Restore (1513.89s)
--- PASS: TestAccAWSRDSCluster_AllowMajorVersionUpgrade (1426.19s)
--- PASS: TestAccAWSRDSCluster_AllowMajorVersionUpgradeWithCustomParameters (1558.52s)
--- PASS: TestAccAWSRDSCluster_AllowMajorVersionUpgradeWithCustomParametersApplyImm (1642.19s)
--- PASS: TestAccAWSRDSCluster_AvailabilityZones (141.56s)
--- PASS: TestAccAWSRDSCluster_backupsUpdate (163.30s)
--- PASS: TestAccAWSRDSCluster_basic (132.15s)
--- PASS: TestAccAWSRDSCluster_ClusterIdentifierPrefix (119.39s)
--- PASS: TestAccAWSRDSCluster_copyTagsToSnapshot (239.42s)
--- PASS: TestAccAWSRDSCluster_DbSubnetGroupName (258.83s)
--- PASS: TestAccAWSRDSCluster_DeletionProtection (163.22s)
--- PASS: TestAccAWSRDSCluster_EnabledCloudwatchLogsExports_MySQL (238.96s)
--- PASS: TestAccAWSRDSCluster_EnabledCloudwatchLogsExports_Postgresql (139.62s)
--- PASS: TestAccAWSRDSCluster_encrypted (160.58s)
--- PASS: TestAccAWSRDSCluster_EngineVersion (490.88s)
--- PASS: TestAccAWSRDSCluster_EngineVersionWithPrimaryInstance (1158.03s)
--- PASS: TestAccAWSRDSCluster_generatedName (160.69s)
--- PASS: TestAccAWSRDSCluster_iamAuth (129.06s)
--- PASS: TestAccAWSRDSCluster_kmsKey (160.21s)
--- PASS: TestAccAWSRDSCluster_missingUserNameCausesError (5.98s)
--- PASS: TestAccAWSRDSCluster_OnlyMajorVersion (710.43s)
--- PASS: TestAccAWSRDSCluster_PointInTimeRestore (344.17s)
--- PASS: TestAccAWSRDSCluster_PointInTimeRestore_EnabledCloudwatchLogsExports (386.12s)
--- PASS: TestAccAWSRDSCluster_Port (190.54s)
--- PASS: TestAccAWSRDSCluster_ReplicationSourceIdentifier_KmsKeyId (1581.22s)
--- PASS: TestAccAWSRDSCluster_SnapshotIdentifier (414.60s)
--- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_DeletionProtection (516.82s)
--- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_EncryptedRestore (490.32s)
--- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_EngineMode_Provisioned (490.34s)
--- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_EngineVersion_Different (480.25s)
--- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_EngineVersion_Equal (533.69s)
--- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_KmsKeyId (480.11s)
--- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_MasterPassword (447.83s)
--- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_MasterUsername (453.80s)
--- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_PreferredBackupWindow (416.62s)
--- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_PreferredMaintenanceWindow (416.77s)
--- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_Tags (458.22s)
--- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_VpcSecurityGroupIds (484.78s)
--- PASS: TestAccAWSRDSCluster_SnapshotIdentifier_VpcSecurityGroupIds_Tags (463.88s)
--- PASS: TestAccAWSRDSCluster_Tags (146.59s)
--- PASS: TestAccAWSRDSCluster_takeFinalSnapshot (213.06s)
--- PASS: TestAccAWSRDSCluster_updateIamRoles (250.98s)
--- PASS: TestAccAWSRDSClusterInstance_az (722.52s)
--- PASS: TestAccAWSRDSClusterInstance_basic (1282.74s)
--- PASS: TestAccAWSRDSClusterInstance_CACertificateIdentifier (762.59s)
--- PASS: TestAccAWSRDSClusterInstance_CopyTagsToSnapshot (692.98s)
--- PASS: TestAccAWSRDSClusterInstance_disappears (573.42s)
--- PASS: TestAccAWSRDSClusterInstance_generatedName (653.01s)
--- PASS: TestAccAWSRDSClusterInstance_isAlreadyBeingDeleted (697.67s)
--- PASS: TestAccAWSRDSClusterInstance_kmsKey (721.85s)
--- PASS: TestAccAWSRDSClusterInstance_MonitoringInterval (1218.41s)
--- PASS: TestAccAWSRDSClusterInstance_MonitoringRoleArn_EnabledToDisabled (1011.94s)
--- PASS: TestAccAWSRDSClusterInstance_MonitoringRoleArn_EnabledToRemoved (919.39s)
--- PASS: TestAccAWSRDSClusterInstance_MonitoringRoleArn_RemovedToEnabled (830.75s)
--- PASS: TestAccAWSRDSClusterInstance_namePrefix (656.12s)
--- PASS: TestAccAWSRDSClusterInstance_PubliclyAccessible (833.86s)
--- SKIP: TestAccAWSRDSCluster_BacktrackWindow (6.28s)
--- SKIP: TestAccAWSRDSCluster_EnableHttpEndpoint (16.45s)
--- SKIP: TestAccAWSRDSCluster_EngineMode (5.62s)
--- SKIP: TestAccAWSRDSCluster_EngineMode_Global (0.35s)
--- SKIP: TestAccAWSRDSCluster_EngineMode_Multimaster (17.18s)
--- SKIP: TestAccAWSRDSCluster_EngineMode_ParallelQuery (9.90s)
--- SKIP: TestAccAWSRDSCluster_GlobalClusterIdentifier_EngineMode_Global (0.35s)
--- SKIP: TestAccAWSRDSCluster_GlobalClusterIdentifier_EngineMode_Global_Add (0.35s)
--- SKIP: TestAccAWSRDSCluster_GlobalClusterIdentifier_EngineMode_Global_Remove (0.71s)
--- SKIP: TestAccAWSRDSCluster_GlobalClusterIdentifier_EngineMode_Global_Update (0.67s)
--- SKIP: TestAccAWSRDSCluster_GlobalClusterIdentifier_EngineMode_Provisioned (0.77s)
--- SKIP: TestAccAWSRDSCluster_GlobalClusterIdentifier_PrimarySecondaryClusters (0.93s)
--- SKIP: TestAccAWSRDSCluster_GlobalClusterIdentifier_ReplicationSourceIdentifier (0.80s)
--- SKIP: TestAccAWSRDSCluster_GlobalClusterIdentifier_SecondaryClustersWriteForwarding (2.20s)
--- SKIP: TestAccAWSRDSCluster_ScalingConfiguration (10.10s)
--- SKIP: TestAccAWSRDSCluster_ScalingConfiguration_DefaultMinCapacity (12.95s)
--- SKIP: TestAccAWSRDSCluster_SnapshotIdentifier_EngineMode_ParallelQuery (16.08s)
--- SKIP: TestAccAWSRDSClusterInstance_PerformanceInsightsEnabled_AuroraMysql1 (1.03s)
--- SKIP: TestAccAWSRDSClusterInstance_PerformanceInsightsEnabled_AuroraMysql2 (0.35s)
--- SKIP: TestAccAWSRDSClusterInstance_PerformanceInsightsEnabled_AuroraPostgresql (1.10s)
--- SKIP: TestAccAWSRDSClusterInstance_PerformanceInsightsKmsKeyId_AuroraMysql1 (0.95s)
--- SKIP: TestAccAWSRDSClusterInstance_PerformanceInsightsKmsKeyId_AuroraMysql1_DefaultKeyToCustomKey (1.05s)
--- SKIP: TestAccAWSRDSClusterInstance_PerformanceInsightsKmsKeyId_AuroraMysql2 (0.36s)
--- SKIP: TestAccAWSRDSClusterInstance_PerformanceInsightsKmsKeyId_AuroraMysql2_DefaultKeyToCustomKey (0.35s)
--- SKIP: TestAccAWSRDSClusterInstance_PerformanceInsightsKmsKeyId_AuroraPostgresql (3.18s)
--- SKIP: TestAccAWSRDSClusterInstance_PerformanceInsightsKmsKeyId_AuroraPostgresql_DefaultKeyToCustomKey (1.09s)
--- SKIP: TestAccAWSRDSClusterInstance_PerformanceInsightsRetentionPeriod (1.07s)

@YakDriver YakDriver added this to the v3.63.0 milestone Oct 13, 2021
@YakDriver YakDriver merged commit 986d04f into hashicorp:main Oct 13, 2021
@YakDriver YakDriver changed the title resource/aws_rds_cluster: Add db_instance_parameter_group_name argument resource/aws_rds_cluster: Various enhancements, bug fixes Oct 14, 2021
@github-actions
Copy link

This functionality has been released in v3.63.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!

@github-actions
Copy link

I'm going to lock this pull request 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 related to this change, 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 Jun 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. service/rds Issues and PRs that pertain to the rds service. size/XL Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
7 participants