-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
r/aws_db_instance: Fix error modifying allocated_storage
when storage_type
is "gp3"
#28243
Conversation
Acceptance test output: % make testacc TESTARGS='-run=TestAccRDSInstance_EnabledCloudWatchLogsExports_postgresql' 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_EnabledCloudWatchLogsExports_postgresql -timeout 180m === RUN TestAccRDSInstance_EnabledCloudWatchLogsExports_postgresql === PAUSE TestAccRDSInstance_EnabledCloudWatchLogsExports_postgresql === CONT TestAccRDSInstance_EnabledCloudWatchLogsExports_postgresql --- PASS: TestAccRDSInstance_EnabledCloudWatchLogsExports_postgresql (614.94s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/rds 619.983s
Acceptance test output: % 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_gp3MySQL === PAUSE TestAccRDSInstance_gp3MySQL === RUN TestAccRDSInstance_gp3Postgres === PAUSE TestAccRDSInstance_gp3Postgres === CONT TestAccRDSInstance_gp3MySQL === CONT TestAccRDSInstance_gp3Postgres --- PASS: TestAccRDSInstance_gp3Postgres (693.72s) --- PASS: TestAccRDSInstance_gp3MySQL (860.05s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/rds 865.392s
Acceptance test output: % make testacc TESTARGS='-run=TestAccRDSInstance_gp3SQLServer' 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_gp3SQLServer -timeout 180m === RUN TestAccRDSInstance_gp3SQLServer === PAUSE TestAccRDSInstance_gp3SQLServer === CONT TestAccRDSInstance_gp3SQLServer --- PASS: TestAccRDSInstance_gp3SQLServer (1061.41s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/rds 1066.408s
Acceptance test output: % make testacc TESTARGS='-run=TestAccRDSInstance_storageTypePostgres' 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_storageTypePostgres -timeout 180m === RUN TestAccRDSInstance_storageTypePostgres === PAUSE TestAccRDSInstance_storageTypePostgres === CONT TestAccRDSInstance_storageTypePostgres --- PASS: TestAccRDSInstance_storageTypePostgres (796.18s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/rds 801.356s
Community NoteVoting for Prioritization
For Submitters
|
There was a problem hiding this 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_gp3SQLServer 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_gp3SQLServer -timeout 180m
=== RUN TestAccRDSInstance_gp3SQLServer
=== PAUSE TestAccRDSInstance_gp3SQLServer
=== CONT TestAccRDSInstance_gp3SQLServer
--- PASS: TestAccRDSInstance_gp3SQLServer (1095.72s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/rds 1098.790s
+ 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 (732.48s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/rds 735.380s
+ 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_gp3MySQL
=== PAUSE TestAccRDSInstance_gp3MySQL
=== RUN TestAccRDSInstance_gp3Postgres
=== PAUSE TestAccRDSInstance_gp3Postgres
=== RUN TestAccRDSInstance_gp3SQLServer
=== PAUSE TestAccRDSInstance_gp3SQLServer
=== CONT TestAccRDSInstance_gp3MySQL
=== CONT TestAccRDSInstance_gp3SQLServer
=== CONT TestAccRDSInstance_gp3Postgres
--- PASS: TestAccRDSInstance_gp3Postgres (817.02s)
--- PASS: TestAccRDSInstance_gp3MySQL (832.30s)
--- PASS: TestAccRDSInstance_gp3SQLServer (1062.37s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/rds 1065.288s
+ make testacc 'TESTARGS=-run=TestAccRDSInstance_ReplicateSourceDB_allocatedStorageAndIops\|TestAccRDSInstance_basic\|TestAccRDSInstance_ReplicateSourceDB_iops\|TestAccRDSInstance_SnapshotIdentifier_io1Storage' 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_ReplicateSourceDB_allocatedStorageAndIops\|TestAccRDSInstance_basic\|TestAccRDSInstance_ReplicateSourceDB_iops\|TestAccRDSInstance_SnapshotIdentifier_io1Storage -timeout 180m
=== RUN TestAccRDSInstance_basic
=== PAUSE TestAccRDSInstance_basic
=== RUN TestAccRDSInstance_ReplicateSourceDB_iops
=== PAUSE TestAccRDSInstance_ReplicateSourceDB_iops
=== RUN TestAccRDSInstance_ReplicateSourceDB_allocatedStorageAndIops
=== PAUSE TestAccRDSInstance_ReplicateSourceDB_allocatedStorageAndIops
=== RUN TestAccRDSInstance_SnapshotIdentifier_io1Storage
=== PAUSE TestAccRDSInstance_SnapshotIdentifier_io1Storage
=== CONT TestAccRDSInstance_basic
=== CONT TestAccRDSInstance_ReplicateSourceDB_allocatedStorageAndIops
=== CONT TestAccRDSInstance_SnapshotIdentifier_io1Storage
--- PASS: TestAccRDSInstance_basic (530.24s)
=== CONT TestAccRDSInstance_ReplicateSourceDB_iops
--- PASS: TestAccRDSInstance_SnapshotIdentifier_io1Storage (1301.87s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_allocatedStorageAndIops (1654.60s)
--- PASS: TestAccRDSInstance_ReplicateSourceDB_iops (1502.45s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/rds 2035.613s
This functionality has been released in v4.46.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! |
@ewbankkit thanks again for your effort, I was able to switch my RDS instance from But my pipelines are now blocked from further applies, if I don't specify |
We have an issue where if we build an RDS instance at 100GiB specifying GP3 storage then the module dynamically sets IOPS to 3000 and throughput to 125MiB as expected However, if we change the allocated_storage to 400GiB or more and apply that the apply fails with the below error Error: updating RDS DB Instance (pg-prod-team-gp3): operation error RDS: ModifyDBInstance, https response error StatusCode: 400, RequestID: 970841cc-a412-4147-820c-700cb17e27fd, api error InvalidParameterCombination: Invalid iops value for engine name postgres and storage type gp3: 3000 If we build an RDS instance from a 100GiB snapshot but specify 400GiB in the terraform code at initial build it does the modification as expected and increases the storage/IOPS/throughput But if we modify it after the instance has been built it errors. Ideally if it could dynamically lookup the values for IOPS/throughput that would be great. If they've been set in the code then set them to that but if they're null or not set to use the defaults i.e <400GiB 3K IOPS/125 MiB/S or >=400GiB 12K IOPS 500MiB/s |
@cdl-danielchapman maybe you want to give a 👍 to this issue I created: #28271 Sounds like exactly the problem I am having ? I like your proposal to have the provider setting the values by default based on what is documented regarding gp3 |
@etiennechabert - done. Apologies I missed your earlier comment. |
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. |
Description
Prevents errors like
modifying
allocated_storage
whenstorage_type
is"gp3"
andallocated_storage
is below a per-engine threshold.Relations
Closes #28160.
Output from Acceptance Testing