-
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
Fixes creating aws_db_instance from snapshot with iops #7426
Conversation
+1 |
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, thanks @sklarsa 🚀 I'm not 100% sure this will cause slower restores in certain use cases, but a working setup is much better than the alternative. The extra acceptance test can be used to guard against future regressions should any optimization be needed, so thank you for adding it.
I'm going to merge #5800 first so @dannosaur gets proper attribution, then merge this afterwards.
Previous output from acceptance test (before code update):
--- FAIL: TestAccAWSDBInstance_SnapshotIdentifier_Io1Storage (1508.07s)
testing.go:538: Step 0 error: Error applying: 1 error occurred:
* aws_db_instance.test: 1 error occurred:
* aws_db_instance.test: error modifying DB Instance (tf-acc-test-6951710415450023739): InvalidParameterCombination: Both storage size and iops must be specified when modifying storage size or iops on an DB Instance that has iops
Output from acceptance testing:
--- PASS: TestAccAWSDBInstance_iamAuth (431.24s)
--- PASS: TestAccAWSDBInstance_kmsKey (440.56s)
--- PASS: TestAccAWSDBInstance_basic (493.29s)
--- PASS: TestAccAWSDBInstance_namePrefix (516.76s)
--- PASS: TestAccAWSDBInstance_generatedName (523.32s)
--- PASS: TestAccAWSDBInstance_DeletionProtection (525.94s)
--- PASS: TestAccAWSDBInstance_optionGroup (542.98s)
--- PASS: TestAccAWSDBInstance_IsAlreadyBeingDeleted (564.03s)
--- PASS: TestAccAWSDBInstance_FinalSnapshotIdentifier_SkipFinalSnapshot (768.31s)
--- PASS: TestAccAWSDBInstance_subnetGroup (915.58s)
--- PASS: TestAccAWSDBInstance_FinalSnapshotIdentifier (970.21s)
--- PASS: TestAccAWSDBInstance_S3Import (694.48s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_Monitoring (1345.59s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_AutoMinorVersionUpgrade (1353.66s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_AvailabilityZone (1404.82s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb (1445.31s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_IamDatabaseAuthenticationEnabled (1527.90s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_BackupWindow (1586.96s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_AllocatedStorage (1676.57s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_MaintenanceWindow (1776.92s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_Port (1311.26s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_ParameterGroupName (1411.21s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier (1329.88s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_AutoMinorVersionUpgrade (1087.99s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_VpcSecurityGroupIds (1383.85s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_BackupRetentionPeriod (1958.83s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_AllocatedStorage (1500.79s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_AvailabilityZone (1128.85s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_Io1Storage (1560.53s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_MultiAZ (1955.20s)
--- PASS: TestAccAWSDBInstance_portUpdate (512.81s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_BackupRetentionPeriod (1600.82s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_IamDatabaseAuthenticationEnabled (1168.50s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_MaintenanceWindow (1128.37s)
--- PASS: TestAccAWSDBInstance_separate_iops_update (674.50s)
--- PASS: TestAccAWSDBInstance_enhancedMonitoring (736.87s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_BackupWindow (1329.85s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_DeletionProtection (1505.73s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_Port (1097.28s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_VpcSecurityGroupIds_Tags (1049.80s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_Monitoring (1401.18s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_BackupRetentionPeriod_Unset (1722.40s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_ParameterGroupName (1249.43s)
--- PASS: TestAccAWSDBInstance_diffSuppressInitialState (459.67s)
--- PASS: TestAccAWSDBInstance_MinorVersion (490.58s)
--- PASS: TestAccAWSDBInstance_cloudwatchLogsExportConfiguration (514.64s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_Tags (1258.04s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_VpcSecurityGroupIds (1330.16s)
--- PASS: TestAccAWSDBInstance_EnabledCloudwatchLogsExports_Postgresql (580.76s)
--- PASS: TestAccAWSDBInstance_cloudwatchLogsExportConfigurationUpdate (766.75s)
--- PASS: TestAccAWSDBInstance_EnabledCloudwatchLogsExports_Oracle (742.12s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_MultiAZ (1853.22s)
--- PASS: TestAccAWSDBInstance_MSSQL_TZ (1530.71s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_MultiAZ_SQLServer (3588.27s)
--- PASS: TestAccAWSDBInstance_MSSQL_DomainSnapshotRestore (2908.84s)
--- PASS: TestAccAWSDBInstance_MSSQL_Domain (3423.36s)
This has been released in version 1.60.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
The same PR as #5800 with an acceptance test added. Thanks to @dannosaur for finding and correcting the bug in the first place.
Changes proposed in this pull request:
Move the iops config element from the initial create to the secondary "modify" stage of the create (the initial iops value gets inherited from the snapshot, so this isn't required in the initial stage
Output from acceptance testing: