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 Bugfix - Replica creation with Allocated Storage and IOPS #12548

Merged

Conversation

corentone
Copy link
Contributor

@corentone corentone commented Mar 26, 2020

Ignore allocated storage while creating a Read Replica

Tests:

  • The acceptance test (allocatedStorageAndIops that would be previously failing), shows the bug by
    setting up a Replica DB with both IOPS and Allocated storage.
  • Also Added an acceptance test for Iops modification to confirm code is ok because of the returned error
    message in the issue. Didn't show failures previously.

Fix:

  • Ignore allocated storage when creating a read replica as this value cannot be different from the primary.
  • Update doc to reflect param handling difference.

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

Closes Issue #12493

Release note for CHANGELOG:

Ignore allocated_storage in RDS DB Instance creation if `replicate_source_db` is set.

Output from acceptance testing:

❯ make testacc TEST=./aws TESTARGS='-run=TestAccAWSDBInstance_ReplicateSourceDb_AllocatedStorageAndIops'; say done
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSDBInstance_ReplicateSourceDb_AllocatedStorageAndIops -timeout 120m
=== RUN   TestAccAWSDBInstance_ReplicateSourceDb_AllocatedStorageAndIops
=== PAUSE TestAccAWSDBInstance_ReplicateSourceDb_AllocatedStorageAndIops
=== CONT  TestAccAWSDBInstance_ReplicateSourceDb_AllocatedStorageAndIops
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_AllocatedStorageAndIops (1874.12s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	1876.199s

@corentone corentone requested a review from a team March 26, 2020 22:58
@ghost ghost added size/M Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. documentation Introduces or discusses updates to documentation. service/rds Issues and PRs that pertain to the rds service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Mar 26, 2020
aws/resource_aws_db_instance.go Outdated Show resolved Hide resolved
@corentone
Copy link
Contributor Author

corentone commented Mar 26, 2020

@bflad You seem to be the main person contributing to the rds resources, Im curious if you have any comment on how to make it better to get it fixed :)

@corentone
Copy link
Contributor Author

Up. It's been in the queue for a long time and I'd love to work with someone to get it in.
@anGie44 maybe would you have some time?

Base automatically changed from master to main January 23, 2021 00:57
@breathingdust breathingdust requested a review from a team as a code owner January 23, 2021 00:57
Corentin Debains and others added 2 commits July 8, 2021 18:22
Ignore allocated storage while creating a Read Replica

* Fixes Issue hashicorp#12493

Tests:

* The acceptance test (allocatedStorageAndIops that would be previously failing), shows the bug by
setting up a Replica DB with both IOPS and Allocated storage.
* Also Added an acceptance test for Iops modification to confirm code is ok because of the returned error
message in the issue. Didn't show failures previously.

Fix:
* Ignore allocated storage when creating a read replica as this value cannot be different from the primary.
* Update doc to reflect param handling difference.
Co-Authored-By: Muffy Barkocy <muffybarkocy@gmail.com>
@YakDriver YakDriver force-pushed the corentone/iops-allocated-storage branch from d95a953 to 7b2203e Compare July 8, 2021 22:22
@YakDriver YakDriver self-assigned this Jul 9, 2021
@YakDriver YakDriver removed the needs-triage Waiting for first response or review from a maintainer. label Jul 9, 2021
@github-actions github-actions bot added size/XL 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 Jul 9, 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):

--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_AllocatedStorageAndIops (1735.36s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_Iops (1898.43s)

Output from acceptance tests (GovCloud):

--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_AllocatedStorageAndIops (1714.20s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_Iops (1870.51s)

@YakDriver YakDriver merged commit dfa38d0 into hashicorp:main Jul 9, 2021
@YakDriver YakDriver added this to the v3.50.0 milestone Jul 9, 2021
@corentone
Copy link
Contributor Author

Thanks @YakDriver for driving it through the finish line!

@github-actions
Copy link

This functionality has been released in v3.50.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 Aug 15, 2021
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
Development

Successfully merging this pull request may close these issues.

5 participants