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

enable gp3 storage_type for aws_db_instance #27670

Merged
merged 21 commits into from
Dec 1, 2022

Conversation

erz4
Copy link
Contributor

@erz4 erz4 commented Nov 6, 2022

Description

Support new RDS storage type of gp3

References

https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html

Closes #27702

@github-actions
Copy link

github-actions bot commented Nov 6, 2022

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 documentation Introduces or discusses updates to documentation. service/rds Issues and PRs that pertain to the rds service. needs-triage Waiting for first response or review from a maintainer. size/XS Managed by automation to categorize the size of a PR. labels Nov 6, 2022
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome @erz4 👋

It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTOR guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.

Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.

Thanks again, and welcome to the community! 😃

@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 Nov 7, 2022
@katdev
Copy link

katdev commented Nov 8, 2022

This is great, but doesn't allow for the additional options configurable when using gp3, specifically provisioned_iops and storage_throughput as requested in #27702 . Can we get those added, either here or in a future PR?

@NivStav-RecoLabs
Copy link

This is great, but doesn't allow for the additional options configurable when using gp3, specifically provisioned_iops and storage_throughput as requested in #27702 . Can we get those added, either here or in a future PR?

For RDS gp3 those are preconfigured and can't be changed.
See the updated docs:
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html

@katdev
Copy link

katdev commented Nov 8, 2022

For RDS gp3 those are preconfigured and can't be changed.
See the updated docs:
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html

The range is set, but those are very much configurable with gp3.
image
These should be the --iops and --storage-throughput options available via the CLI.

@NivStav-RecoLabs
Copy link

Interesting, in Postgress these are grayed out, what engine are you using?
image

@katdev
Copy link

katdev commented Nov 8, 2022

It's the storage -- the options aren't available until storage is >=400GB. Note the comment To provision additional IOPS and throughput, increase the allocated storage to 400 GiB or greater.

@garyhampson
Copy link

garyhampson commented Nov 9, 2022

Came here to post the same findings as @katdev regarding storage_throughput. I think that https://github.com/hashicorp/terraform-provider-aws/blob/main/internal/service/rds/instance.go would also need to be updated, particularly in the area of lines 1761-1767.
image

@erz4
Copy link
Contributor Author

erz4 commented Nov 13, 2022

@katdev @NivStav-RecoLabs @garyhampson I added the storage_throughput att

@robw-ca
Copy link

robw-ca commented Nov 13, 2022

The storage throughput should really default to 125, which is the free amount.

@ToonSpinISAAC
Copy link

ToonSpinISAAC commented Nov 14, 2022

I agree with @robw-ca that the storage throughput default should be 125 but for a different reason - it's both what the console defaults to (edit: at least for the menu choices I made in the console just now), and what the baseline is for storage under 400GB.

Is it possible without much effort to make the default throughput value vary based on the storage size? Because if so then maybe it would be even better to mimic the console further, and have it be 125 for under 400GB and 500 for 400GB and greater. My reasoning for this is that I feel like many if not most people will want to just specify storage and not tweak throughput.

Either way I will be happy to see this merged, thanks for the effort everyone. If my Go skills were good enough I would happily contribute.

@erz4
Copy link
Contributor Author

erz4 commented Nov 14, 2022

I agree with @robw-ca that the storage throughput default should be 125 but for a different reason - it's both what the console defaults to (edit: at least for the menu choices I made in the console just now), and what the baseline is for storage under 400GB.

Is it possible without much effort to make the default throughput value vary based on the storage size? Because if so then maybe it would be even better to mimic the console further, and have it be 125 for under 400GB and 500 for 400GB and greater. My reasoning for this is that I feel like many if not most people will want to just specify storage and not tweak throughput.

Either way I will be happy to see this merged, thanks for the effort everyone. If my Go skills were good enough I would happily contribute.

As you said when the storage allocation gets to 400GB the storage throughput goes to 500 and stays like that unless the user changes it
image

@robw-ca
Copy link

robw-ca commented Nov 14, 2022

Ah didn't see those docs, and assumed it'd stay with the default 125 as a default EBS volume would!

@github-actions github-actions bot added tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. size/L Managed by automation to categorize the size of a PR. and removed size/XS Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Nov 30, 2022
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=TestAccRDSInstanceDataSource_basic' PKG=rds ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/rds/... -v -count 1 -parallel 3  -run=TestAccRDSInstanceDataSource_basic -timeout 180m
=== RUN   TestAccRDSInstanceDataSource_basic
=== PAUSE TestAccRDSInstanceDataSource_basic
=== CONT  TestAccRDSInstanceDataSource_basic
--- PASS: TestAccRDSInstanceDataSource_basic (565.13s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/rds	570.413s
% make testacc TESTARGS='-run=TestAccRDSInstance_basic' PKG=rds ACCTEST_PARALLELISM=3                              
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/rds/... -v -count 1 -parallel 3  -run=TestAccRDSInstance_basic -timeout 180m
=== RUN   TestAccRDSInstance_basic
=== PAUSE TestAccRDSInstance_basic
=== CONT  TestAccRDSInstance_basic
--- PASS: TestAccRDSInstance_basic (494.62s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/rds	499.714s
% make testacc TESTARGS='-run=TestAccRDSInstance_separateIopsUpdate' PKG=rds ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/rds/... -v -count 1 -parallel 3  -run=TestAccRDSInstance_separateIopsUpdate -timeout 180m
=== RUN   TestAccRDSInstance_separateIopsUpdate
=== PAUSE TestAccRDSInstance_separateIopsUpdate
=== CONT  TestAccRDSInstance_separateIopsUpdate
--- PASS: TestAccRDSInstance_separateIopsUpdate (771.03s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/rds	775.895s
% make testacc TESTARGS='-run=TestAccRDSInstance_gp3' PKG=rds ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/rds/... -v -count 1 -parallel 3  -run=TestAccRDSInstance_gp3 -timeout 180m
=== RUN   TestAccRDSInstance_gp3
=== PAUSE TestAccRDSInstance_gp3
=== CONT  TestAccRDSInstance_gp3
--- PASS: TestAccRDSInstance_gp3 (547.32s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/rds	552.106s
% make testacc TESTARGS='-run=TestAccRDSInstance_storageThroughput' PKG=rds ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/rds/... -v -count 1 -parallel 3  -run=TestAccRDSInstance_storageThroughput -timeout 180m
=== RUN   TestAccRDSInstance_storageThroughput
=== PAUSE TestAccRDSInstance_storageThroughput
=== CONT  TestAccRDSInstance_storageThroughput
--- PASS: TestAccRDSInstance_storageThroughput (698.24s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/rds	703.129s

@erz4 erz4 requested a review from gdavison December 1, 2022 07:37
@github-actions github-actions bot added the tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. label Dec 1, 2022
@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 Dec 1, 2022
@github-actions github-actions bot added the generators Relates to code generators. label Dec 1, 2022
@ewbankkit
Copy link
Contributor

@erz4 Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit 3f7272f into hashicorp:main Dec 1, 2022
@github-actions github-actions bot added this to the v4.45.0 milestone Dec 1, 2022
@erz4 erz4 deleted the f-rds-enable-gp3 branch December 1, 2022 16:02
@github-actions
Copy link

github-actions bot commented Dec 2, 2022

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

take-five added a commit to take-five/terraform-aws-rds that referenced this pull request Dec 5, 2022
AWS recently [added support for `gp3` storage type][1], and Terraform
AWS provider [implemented][2] this functionality as well in version 4.45.0.

Closes terraform-aws-modules#452

[1]: https://aws.amazon.com/about-aws/whats-new/2022/11/amazon-rds-general-purpose-gp3-storage-volumes/
[2]: hashicorp/terraform-provider-aws#27670
take-five added a commit to take-five/terraform-aws-rds that referenced this pull request Dec 5, 2022
AWS recently [added support for `gp3` storage type][1], and Terraform
AWS provider [implemented][2] this functionality as well in version 4.45.0.

Closes terraform-aws-modules#452

[1]: https://aws.amazon.com/about-aws/whats-new/2022/11/amazon-rds-general-purpose-gp3-storage-volumes/
[2]: hashicorp/terraform-provider-aws#27670
take-five added a commit to take-five/terraform-aws-rds that referenced this pull request Dec 5, 2022
AWS recently [added support for `gp3` storage type][1], and Terraform
AWS provider [implemented][2] this functionality as well in version 4.45.0.

Closes terraform-aws-modules#452

[1]: https://aws.amazon.com/about-aws/whats-new/2022/11/amazon-rds-general-purpose-gp3-storage-volumes/
[2]: hashicorp/terraform-provider-aws#27670
take-five added a commit to take-five/terraform-aws-rds that referenced this pull request Dec 5, 2022
AWS recently [added support for `gp3` storage type][1], and Terraform
AWS provider [implemented][2] this functionality as well in version 4.45.0.

Closes terraform-aws-modules#452

[1]: https://aws.amazon.com/about-aws/whats-new/2022/11/amazon-rds-general-purpose-gp3-storage-volumes/
[2]: hashicorp/terraform-provider-aws#27670
@github-actions
Copy link

github-actions bot commented Jan 2, 2023

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 Jan 2, 2023
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. enhancement Requests to existing resources that expand the functionality or scope. generators Relates to code generators. 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.

[Enhancement]: Add gp3 storage_type support to aws_db_instance