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_db_instance: Sets parameter_group_name on replica when source is in different region #36080

Merged
merged 3 commits into from
Mar 5, 2024

Conversation

gdavison
Copy link
Contributor

@gdavison gdavison commented Mar 5, 2024

Description

When creating a replica RDS Instance, the parameter group was set during a modify step after creation. This is because the parameter group cannot be set when creating a replica in the same region as the source. When using parameter values that cannot be changed after creation, such as the max_string_size for Oracle, this would cause errors when creating a replica.

Now sets the parameter group on creation when the source DB is located in a different region.

Relations

Closes #31719

References

Output from Acceptance Testing

% make testacc PKG=rds TESTS=TestAccRDSInstance_ReplicateSourceDB

--- PASS: TestAccRDSInstance_ReplicateSourceDB_allowMajorVersionUpgrade (1313.53s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_iops (1374.11s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_allocatedStorage (1496.60s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_availabilityZone (1505.49s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_backupWindow (1506.24s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_maintenanceWindow (1506.33s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_dbSubnetGroupNameVPCSecurityGroupIDs (1556.60s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_performanceInsightsEnabled (1567.78s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_autoMinorVersionUpgrade (1576.46s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_iamDatabaseAuthenticationEnabled (1576.64s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_allocatedStorageAndIops (1623.85s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_addLater (1628.32s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_nameGenerated (1642.10s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_maxAllocatedStorage (1706.99s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_basic (1707.61s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_parameterGroupNameSetOnReplica (1737.21s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_dbSubnetGroupName (1833.15s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_backupRetentionPeriod (1920.85s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_namePrefix (1452.86s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_networkType (1423.24s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_replicaMode (2847.91s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_vpcSecurityGroupIDs (1329.94s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_parameterGroupNameSameSetOnBoth (1409.32s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_caCertificateIdentifier (1481.40s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_port (1622.38s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_monitoring (1677.64s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_parameterGroupNameReplicaCopiesValue (1804.33s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_monitoring_sourceAlreadyExists (1733.31s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_parameterGroupNameDifferentSetOnBoth (1904.54s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_multiAZ (2119.87s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_CrossRegion_parameterGroupNameEquivalent (3843.25s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_parameterGroupTwoStep (3090.11s)

Copy link

github-actions bot commented Mar 5, 2024

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 size/M Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/rds Issues and PRs that pertain to the rds service. labels Mar 5, 2024
@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 Mar 5, 2024
Copy link

github-actions bot commented Mar 5, 2024

Thank you for your contribution! 🚀

A new usage of AWS SDK for Go V1 was detected. Please prefer AWS SDK for Go V2 for all net-new services. If this is an enhancement or bug fix to an existing AWS SDK Go V1 based resource, this comment can be safely ignored.

For additional information refer to the AWS SDK for Go Versions page in the contributor guide.

@ewbankkit ewbankkit self-assigned this Mar 5, 2024
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=TestAccRDSInstance_ReplicateSourceDB_CrossRegion_parameterGroupNameEquivalent\|TestAccRDSInstance_ReplicateSourceDB_basic' PKG=rds
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/rds/... -v -count 1 -parallel 20  -run=TestAccRDSInstance_ReplicateSourceDB_CrossRegion_parameterGroupNameEquivalent\|TestAccRDSInstance_ReplicateSourceDB_basic -timeout 360m
=== RUN   TestAccRDSInstance_ReplicateSourceDB_basic
=== PAUSE TestAccRDSInstance_ReplicateSourceDB_basic
=== RUN   TestAccRDSInstance_ReplicateSourceDB_CrossRegion_parameterGroupNameEquivalent
=== PAUSE TestAccRDSInstance_ReplicateSourceDB_CrossRegion_parameterGroupNameEquivalent
=== CONT  TestAccRDSInstance_ReplicateSourceDB_basic
=== CONT  TestAccRDSInstance_ReplicateSourceDB_CrossRegion_parameterGroupNameEquivalent
--- PASS: TestAccRDSInstance_ReplicateSourceDB_basic (1614.40s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_CrossRegion_parameterGroupNameEquivalent (3721.72s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/rds	3730.069s

@ewbankkit ewbankkit added the bug Addresses a defect in current functionality. label Mar 5, 2024
@ewbankkit ewbankkit removed their assignment Mar 5, 2024
@gdavison gdavison merged commit 6234bd0 into main Mar 5, 2024
59 checks passed
@gdavison gdavison deleted the b-rds-replica-parameter-group branch March 5, 2024 18:11
@github-actions github-actions bot added this to the v5.40.0 milestone Mar 5, 2024
github-actions bot pushed a commit that referenced this pull request Mar 5, 2024
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Mar 7, 2024
Copy link

github-actions bot commented Mar 7, 2024

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

Copy link

github-actions bot commented Apr 7, 2024

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 Apr 7, 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. documentation Introduces or discusses updates to documentation. service/rds Issues and PRs that pertain to the rds service. size/M 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
Development

Successfully merging this pull request may close these issues.

RDS: aws_db_instance not assigning custom parameter_group_name
2 participants