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

Fixes creating aws_db_instance from snapshot with iops #7426

Merged
merged 1 commit into from
Feb 22, 2019

Conversation

sklarsa
Copy link

@sklarsa sklarsa commented Feb 1, 2019

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:

Stevens-MacBook-Pro-2:terraform-provider-aws steven$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSDBInstance_SnapshotIdentifier_Io1Storage'
TF_ACC=1 go test ./aws -v -parallel 20 -run=TestAccAWSDBInstance_SnapshotIdentifier_Io1Storage -timeout 120m
=== RUN   TestAccAWSDBInstance_SnapshotIdentifier_Io1Storage
=== PAUSE TestAccAWSDBInstance_SnapshotIdentifier_Io1Storage
=== CONT  TestAccAWSDBInstance_SnapshotIdentifier_Io1Storage
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_Io1Storage (1481.44s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	1481.491s

@ghost ghost added size/M Managed by automation to categorize the size of a PR. service/rds Issues and PRs that pertain to the rds service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Feb 1, 2019
@sklarsa
Copy link
Author

sklarsa commented Feb 5, 2019

pinging @bflad since this is a bug affecting multiple users per the comments on #5800

@hernan82arg
Copy link

+1

@bflad bflad added the bug Addresses a defect in current functionality. label Feb 22, 2019
@bflad bflad added this to the v1.60.0 milestone Feb 22, 2019
Copy link
Contributor

@bflad bflad left a 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)

@bflad bflad merged commit eedd907 into hashicorp:master Feb 22, 2019
bflad added a commit that referenced this pull request Feb 22, 2019
@bflad
Copy link
Contributor

bflad commented Feb 22, 2019

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.

@ghost
Copy link

ghost commented Mar 31, 2020

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!

@ghost ghost locked and limited conversation to collaborators Mar 31, 2020
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. 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.

3 participants