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

RDS Custom enhancements #32846

Merged
merged 27 commits into from
Aug 7, 2023

Conversation

AdamTylerLynch
Copy link
Collaborator

@AdamTylerLynch AdamTylerLynch commented Aug 3, 2023

Description

This pull request adds enhanced support for RDS Custom. Cluster and Instance level changes.

Relations

Closes #0000

References

Output from Acceptance Testing

make testacc PKG=rds TESTS=TestAccRDSCluster_ ACCTEST_PARALLELISM=5
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/rds/... -v -count 1 -parallel 5 -run='TestAccRDSCluster_'  -timeout 180m
=== RUN   TestAccRDSCluster_basic
=== PAUSE TestAccRDSCluster_basic
=== RUN   TestAccRDSCluster_disappears
=== PAUSE TestAccRDSCluster_disappears
=== RUN   TestAccRDSCluster_tags
=== PAUSE TestAccRDSCluster_tags
=== RUN   TestAccRDSCluster_identifierGenerated
=== PAUSE TestAccRDSCluster_identifierGenerated
=== RUN   TestAccRDSCluster_identifierPrefix
=== PAUSE TestAccRDSCluster_identifierPrefix
=== RUN   TestAccRDSCluster_allowMajorVersionUpgrade
=== PAUSE TestAccRDSCluster_allowMajorVersionUpgrade
=== RUN   TestAccRDSCluster_allowMajorVersionUpgradeNoApplyImmediately
=== PAUSE TestAccRDSCluster_allowMajorVersionUpgradeNoApplyImmediately
=== RUN   TestAccRDSCluster_allowMajorVersionUpgradeWithCustomParametersApplyImm
=== PAUSE TestAccRDSCluster_allowMajorVersionUpgradeWithCustomParametersApplyImm
=== RUN   TestAccRDSCluster_allowMajorVersionUpgradeWithCustomParameters
=== PAUSE TestAccRDSCluster_allowMajorVersionUpgradeWithCustomParameters
=== RUN   TestAccRDSCluster_onlyMajorVersion
=== PAUSE TestAccRDSCluster_onlyMajorVersion
=== RUN   TestAccRDSCluster_minorVersion
=== PAUSE TestAccRDSCluster_minorVersion
=== RUN   TestAccRDSCluster_availabilityZones
=== PAUSE TestAccRDSCluster_availabilityZones
=== RUN   TestAccRDSCluster_storageTypeIo1
=== PAUSE TestAccRDSCluster_storageTypeIo1
=== RUN   TestAccRDSCluster_storageTypeAuroraReturnsBlank
=== PAUSE TestAccRDSCluster_storageTypeAuroraReturnsBlank
=== RUN   TestAccRDSCluster_storageTypeAuroraIopt1
=== PAUSE TestAccRDSCluster_storageTypeAuroraIopt1
=== RUN   TestAccRDSCluster_storageTypeAuroraUpdateAuroraIopt1
=== PAUSE TestAccRDSCluster_storageTypeAuroraUpdateAuroraIopt1
=== RUN   TestAccRDSCluster_allocatedStorage
=== PAUSE TestAccRDSCluster_allocatedStorage
=== RUN   TestAccRDSCluster_storageTypeAuroraIopt1UpdateAurora
=== PAUSE TestAccRDSCluster_storageTypeAuroraIopt1UpdateAurora
=== RUN   TestAccRDSCluster_iops
=== PAUSE TestAccRDSCluster_iops
=== RUN   TestAccRDSCluster_dbClusterInstanceClass
=== PAUSE TestAccRDSCluster_dbClusterInstanceClass
=== RUN   TestAccRDSCluster_backtrackWindow
=== PAUSE TestAccRDSCluster_backtrackWindow
=== RUN   TestAccRDSCluster_dbSubnetGroupName
=== PAUSE TestAccRDSCluster_dbSubnetGroupName
=== RUN   TestAccRDSCluster_pointInTimeRestore
=== PAUSE TestAccRDSCluster_pointInTimeRestore
=== RUN   TestAccRDSCluster_PointInTimeRestore_enabledCloudWatchLogsExports
=== PAUSE TestAccRDSCluster_PointInTimeRestore_enabledCloudWatchLogsExports
=== RUN   TestAccRDSCluster_takeFinalSnapshot
=== PAUSE TestAccRDSCluster_takeFinalSnapshot
=== RUN   TestAccRDSCluster_missingUserNameCausesError
=== PAUSE TestAccRDSCluster_missingUserNameCausesError
=== RUN   TestAccRDSCluster_EnabledCloudWatchLogsExports_mySQL
=== PAUSE TestAccRDSCluster_EnabledCloudWatchLogsExports_mySQL
=== RUN   TestAccRDSCluster_EnabledCloudWatchLogsExports_postgresql
=== PAUSE TestAccRDSCluster_EnabledCloudWatchLogsExports_postgresql
=== RUN   TestAccRDSCluster_updateIAMRoles
=== PAUSE TestAccRDSCluster_updateIAMRoles
=== RUN   TestAccRDSCluster_kmsKey
=== PAUSE TestAccRDSCluster_kmsKey
=== RUN   TestAccRDSCluster_networkType
=== PAUSE TestAccRDSCluster_networkType
=== RUN   TestAccRDSCluster_encrypted
=== PAUSE TestAccRDSCluster_encrypted
=== RUN   TestAccRDSCluster_copyTagsToSnapshot
=== PAUSE TestAccRDSCluster_copyTagsToSnapshot
=== RUN   TestAccRDSCluster_ReplicationSourceIdentifier_kmsKeyID
=== PAUSE TestAccRDSCluster_ReplicationSourceIdentifier_kmsKeyID
=== RUN   TestAccRDSCluster_backupsUpdate
=== PAUSE TestAccRDSCluster_backupsUpdate
=== RUN   TestAccRDSCluster_iamAuth
=== PAUSE TestAccRDSCluster_iamAuth
=== RUN   TestAccRDSCluster_deletionProtection
=== PAUSE TestAccRDSCluster_deletionProtection
=== RUN   TestAccRDSCluster_engineMode
=== PAUSE TestAccRDSCluster_engineMode
=== RUN   TestAccRDSCluster_engineVersion
=== PAUSE TestAccRDSCluster_engineVersion
=== RUN   TestAccRDSCluster_engineVersionWithPrimaryInstance
=== PAUSE TestAccRDSCluster_engineVersionWithPrimaryInstance
=== RUN   TestAccRDSCluster_GlobalClusterIdentifierEngineMode_global
=== PAUSE TestAccRDSCluster_GlobalClusterIdentifierEngineMode_global
=== RUN   TestAccRDSCluster_GlobalClusterIdentifierEngineModeGlobal_add
=== PAUSE TestAccRDSCluster_GlobalClusterIdentifierEngineModeGlobal_add
=== RUN   TestAccRDSCluster_GlobalClusterIdentifierEngineModeGlobal_remove
=== PAUSE TestAccRDSCluster_GlobalClusterIdentifierEngineModeGlobal_remove
=== RUN   TestAccRDSCluster_GlobalClusterIdentifierEngineModeGlobal_update
=== PAUSE TestAccRDSCluster_GlobalClusterIdentifierEngineModeGlobal_update
=== RUN   TestAccRDSCluster_GlobalClusterIdentifierEngineMode_provisioned
=== PAUSE TestAccRDSCluster_GlobalClusterIdentifierEngineMode_provisioned
=== RUN   TestAccRDSCluster_GlobalClusterIdentifier_primarySecondaryClusters
=== PAUSE TestAccRDSCluster_GlobalClusterIdentifier_primarySecondaryClusters
=== RUN   TestAccRDSCluster_GlobalClusterIdentifier_replicationSourceIdentifier
=== PAUSE TestAccRDSCluster_GlobalClusterIdentifier_replicationSourceIdentifier
=== RUN   TestAccRDSCluster_GlobalClusterIdentifier_secondaryClustersWriteForwarding
=== PAUSE TestAccRDSCluster_GlobalClusterIdentifier_secondaryClustersWriteForwarding
=== RUN   TestAccRDSCluster_ManagedMasterPassword_managed
=== PAUSE TestAccRDSCluster_ManagedMasterPassword_managed
=== RUN   TestAccRDSCluster_ManagedMasterPassword_managedSpecificKMSKey
=== PAUSE TestAccRDSCluster_ManagedMasterPassword_managedSpecificKMSKey
=== RUN   TestAccRDSCluster_ManagedMasterPassword_convertToManaged
=== PAUSE TestAccRDSCluster_ManagedMasterPassword_convertToManaged
=== RUN   TestAccRDSCluster_port
=== PAUSE TestAccRDSCluster_port
=== RUN   TestAccRDSCluster_scaling
=== PAUSE TestAccRDSCluster_scaling
=== RUN   TestAccRDSCluster_serverlessV2ScalingConfiguration
=== PAUSE TestAccRDSCluster_serverlessV2ScalingConfiguration
=== RUN   TestAccRDSCluster_Scaling_defaultMinCapacity
=== PAUSE TestAccRDSCluster_Scaling_defaultMinCapacity
=== RUN   TestAccRDSCluster_snapshotIdentifier
=== PAUSE TestAccRDSCluster_snapshotIdentifier
=== RUN   TestAccRDSCluster_SnapshotIdentifier_deletionProtection
=== PAUSE TestAccRDSCluster_SnapshotIdentifier_deletionProtection
=== RUN   TestAccRDSCluster_SnapshotIdentifierEngineMode_provisioned
=== PAUSE TestAccRDSCluster_SnapshotIdentifierEngineMode_provisioned
=== RUN   TestAccRDSCluster_SnapshotIdentifierEngineMode_serverless
    cluster_test.go:2059: serverless does not support snapshot restore on an empty volume
--- SKIP: TestAccRDSCluster_SnapshotIdentifierEngineMode_serverless (0.00s)
=== RUN   TestAccRDSCluster_SnapshotIdentifierEngineVersion_different
=== PAUSE TestAccRDSCluster_SnapshotIdentifierEngineVersion_different
=== RUN   TestAccRDSCluster_SnapshotIdentifierEngineVersion_equal
=== PAUSE TestAccRDSCluster_SnapshotIdentifierEngineVersion_equal
=== RUN   TestAccRDSCluster_SnapshotIdentifier_kmsKeyID
=== PAUSE TestAccRDSCluster_SnapshotIdentifier_kmsKeyID
=== RUN   TestAccRDSCluster_SnapshotIdentifier_masterPassword
=== PAUSE TestAccRDSCluster_SnapshotIdentifier_masterPassword
=== RUN   TestAccRDSCluster_SnapshotIdentifier_masterUsername
=== PAUSE TestAccRDSCluster_SnapshotIdentifier_masterUsername
=== RUN   TestAccRDSCluster_SnapshotIdentifier_preferredBackupWindow
=== PAUSE TestAccRDSCluster_SnapshotIdentifier_preferredBackupWindow
=== RUN   TestAccRDSCluster_SnapshotIdentifier_preferredMaintenanceWindow
=== PAUSE TestAccRDSCluster_SnapshotIdentifier_preferredMaintenanceWindow
=== RUN   TestAccRDSCluster_SnapshotIdentifier_tags
=== PAUSE TestAccRDSCluster_SnapshotIdentifier_tags
=== RUN   TestAccRDSCluster_SnapshotIdentifier_vpcSecurityGroupIDs
=== PAUSE TestAccRDSCluster_SnapshotIdentifier_vpcSecurityGroupIDs
=== RUN   TestAccRDSCluster_SnapshotIdentifierVPCSecurityGroupIDs_tags
=== PAUSE TestAccRDSCluster_SnapshotIdentifierVPCSecurityGroupIDs_tags
=== RUN   TestAccRDSCluster_SnapshotIdentifier_encryptedRestore
=== PAUSE TestAccRDSCluster_SnapshotIdentifier_encryptedRestore
=== RUN   TestAccRDSCluster_enableHTTPEndpoint
=== PAUSE TestAccRDSCluster_enableHTTPEndpoint
=== RUN   TestAccRDSCluster_password
=== PAUSE TestAccRDSCluster_password
=== CONT  TestAccRDSCluster_basic
=== CONT  TestAccRDSCluster_deletionProtection
=== CONT  TestAccRDSCluster_iops
=== CONT  TestAccRDSCluster_onlyMajorVersion
=== CONT  TestAccRDSCluster_allowMajorVersionUpgrade
--- PASS: TestAccRDSCluster_basic (179.86s)
=== CONT  TestAccRDSCluster_allowMajorVersionUpgradeWithCustomParameters
--- PASS: TestAccRDSCluster_deletionProtection (295.24s)
=== CONT  TestAccRDSCluster_allowMajorVersionUpgradeWithCustomParametersApplyImm
--- PASS: TestAccRDSCluster_onlyMajorVersion (1296.27s)
=== CONT  TestAccRDSCluster_allowMajorVersionUpgradeNoApplyImmediately
--- PASS: TestAccRDSCluster_iops (1841.74s)
=== CONT  TestAccRDSCluster_EnabledCloudWatchLogsExports_postgresql
    cluster_test.go:982: Step 1/2 error: Error running apply: exit status 1
        
        Error: creating RDS Cluster (tf-acc-test-325438946301995907): InvalidParameterCombination: Cannot find version 13.4 for postgres
        	status code: 400, request id: b7f4a4bd-d46e-446a-9199-a2f4465f924c
        
          with aws_rds_cluster.test,
          on terraform_plugin_test.tf line 2, in resource "aws_rds_cluster" "test":
           2: resource "aws_rds_cluster" "test" {
        
--- FAIL: TestAccRDSCluster_EnabledCloudWatchLogsExports_postgresql (19.31s)
=== CONT  TestAccRDSCluster_iamAuth
--- PASS: TestAccRDSCluster_iamAuth (167.20s)
=== CONT  TestAccRDSCluster_backupsUpdate
--- PASS: TestAccRDSCluster_backupsUpdate (265.84s)
=== CONT  TestAccRDSCluster_ReplicationSourceIdentifier_kmsKeyID
--- PASS: TestAccRDSCluster_allowMajorVersionUpgrade (2584.31s)
=== CONT  TestAccRDSCluster_copyTagsToSnapshot
--- PASS: TestAccRDSCluster_allowMajorVersionUpgradeNoApplyImmediately (1472.96s)
=== CONT  TestAccRDSCluster_encrypted
--- PASS: TestAccRDSCluster_copyTagsToSnapshot (305.01s)
=== CONT  TestAccRDSCluster_networkType
--- PASS: TestAccRDSCluster_allowMajorVersionUpgradeWithCustomParameters (2730.48s)
=== CONT  TestAccRDSCluster_kmsKey
=== NAME  TestAccRDSCluster_ReplicationSourceIdentifier_kmsKeyID
    cluster_test.go:1182: Step 1/1 error: Error running apply: exit status 1
        
        Error: creating EC2 VPC: operation error EC2: CreateVpc, https response error StatusCode: 400, RequestID: 5370ad73-b0f2-416f-973c-8455fd66e6fb, api error VpcLimitExceeded: The maximum number of VPCs has been reached.
        
          with aws_vpc.test,
          on terraform_plugin_test.tf line 76, in resource "aws_vpc" "test":
          76: resource "aws_vpc" "test" {
        
--- PASS: TestAccRDSCluster_allowMajorVersionUpgradeWithCustomParametersApplyImm (2655.09s)
=== CONT  TestAccRDSCluster_updateIAMRoles
--- PASS: TestAccRDSCluster_encrypted (197.33s)
=== CONT  TestAccRDSCluster_storageTypeAuroraIopt1
--- PASS: TestAccRDSCluster_kmsKey (206.35s)
=== CONT  TestAccRDSCluster_storageTypeAuroraIopt1UpdateAurora
--- PASS: TestAccRDSCluster_storageTypeAuroraIopt1 (223.86s)
=== CONT  TestAccRDSCluster_allocatedStorage
--- PASS: TestAccRDSCluster_networkType (341.13s)
=== CONT  TestAccRDSCluster_storageTypeAuroraUpdateAuroraIopt1
--- PASS: TestAccRDSCluster_updateIAMRoles (287.50s)
=== CONT  TestAccRDSCluster_Scaling_defaultMinCapacity
--- PASS: TestAccRDSCluster_storageTypeAuroraIopt1UpdateAurora (364.52s)
=== CONT  TestAccRDSCluster_password
--- PASS: TestAccRDSCluster_storageTypeAuroraUpdateAuroraIopt1 (312.57s)
=== CONT  TestAccRDSCluster_enableHTTPEndpoint
--- PASS: TestAccRDSCluster_Scaling_defaultMinCapacity (336.06s)
=== CONT  TestAccRDSCluster_SnapshotIdentifier_encryptedRestore
--- FAIL: TestAccRDSCluster_ReplicationSourceIdentifier_kmsKeyID (1389.96s)
=== CONT  TestAccRDSCluster_SnapshotIdentifierVPCSecurityGroupIDs_tags
--- PASS: TestAccRDSCluster_password (225.10s)
=== CONT  TestAccRDSCluster_SnapshotIdentifier_vpcSecurityGroupIDs
--- PASS: TestAccRDSCluster_enableHTTPEndpoint (399.61s)
=== CONT  TestAccRDSCluster_SnapshotIdentifier_tags
--- PASS: TestAccRDSCluster_SnapshotIdentifier_encryptedRestore (418.84s)
=== CONT  TestAccRDSCluster_SnapshotIdentifier_preferredMaintenanceWindow
--- PASS: TestAccRDSCluster_SnapshotIdentifier_vpcSecurityGroupIDs (386.30s)
=== CONT  TestAccRDSCluster_SnapshotIdentifier_preferredBackupWindow


...

Tests all passed, but my terminal timed out and closed and I lost the output.

@github-actions
Copy link

github-actions bot commented Aug 3, 2023

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull 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.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added service/rds Issues and PRs that pertain to the rds service. size/S Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. partner Contribution from a partner. labels Aug 3, 2023
@justinretzolk justinretzolk added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Aug 3, 2023
@AdamTylerLynch AdamTylerLynch changed the title [WIP] RDS Custom enhancements RDS Custom enhancements Aug 4, 2023
@github-actions github-actions bot added size/M Managed by automation to categorize the size of a PR. and removed size/S Managed by automation to categorize the size of a PR. labels Aug 4, 2023
Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

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

LGTM 🚀.

% make testacc TESTARGS='-run=TestAccRDSCluster_basic\|TestAccRDSCluster_disappears\|TestAccRDSCluster_engineMode\|TestAccRDSCluster_engineVersion\|TestAccRDSClusterDataSource_basic\|TestAccRDSClusterInstance_basic' PKG=rds ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/rds/... -v -count 1 -parallel 2  -run=TestAccRDSCluster_basic\|TestAccRDSCluster_disappears\|TestAccRDSCluster_engineMode\|TestAccRDSCluster_engineVersion\|TestAccRDSClusterDataSource_basic\|TestAccRDSClusterInstance_basic -timeout 180m
=== RUN   TestAccRDSClusterDataSource_basic
=== PAUSE TestAccRDSClusterDataSource_basic
=== RUN   TestAccRDSClusterInstance_basic
=== PAUSE TestAccRDSClusterInstance_basic
=== RUN   TestAccRDSCluster_basic
=== PAUSE TestAccRDSCluster_basic
=== RUN   TestAccRDSCluster_disappears
=== PAUSE TestAccRDSCluster_disappears
=== RUN   TestAccRDSCluster_engineMode
=== PAUSE TestAccRDSCluster_engineMode
=== RUN   TestAccRDSCluster_engineVersion
=== PAUSE TestAccRDSCluster_engineVersion
=== RUN   TestAccRDSCluster_engineVersionWithPrimaryInstance
=== PAUSE TestAccRDSCluster_engineVersionWithPrimaryInstance
=== CONT  TestAccRDSClusterDataSource_basic
=== CONT  TestAccRDSCluster_engineMode
--- PASS: TestAccRDSClusterDataSource_basic (194.48s)
=== CONT  TestAccRDSCluster_basic
--- PASS: TestAccRDSCluster_basic (160.07s)
=== CONT  TestAccRDSCluster_disappears
--- PASS: TestAccRDSCluster_disappears (182.71s)
=== CONT  TestAccRDSCluster_engineVersionWithPrimaryInstance
--- PASS: TestAccRDSCluster_engineMode (509.33s)
=== CONT  TestAccRDSClusterInstance_basic
--- PASS: TestAccRDSClusterInstance_basic (1447.62s)
=== CONT  TestAccRDSCluster_engineVersion
--- PASS: TestAccRDSCluster_engineVersionWithPrimaryInstance (1834.33s)
--- PASS: TestAccRDSCluster_engineVersion (579.01s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/rds	2541.363s

@ewbankkit ewbankkit self-assigned this Aug 6, 2023
@terraform-aws-provider terraform-aws-provider bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Aug 6, 2023
@ewbankkit
Copy link
Contributor

@AdamTylerLynch Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit 12b7deb into hashicorp:main Aug 7, 2023
60 checks passed
@github-actions github-actions bot added this to the v5.12.0 milestone Aug 7, 2023
@github-actions
Copy link

This functionality has been released in v5.12.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 Sep 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. partner Contribution from a partner. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. service/rds Issues and PRs that pertain to the rds service. size/M Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants