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

resource/aws_db_instance: Prevent double apply for snapshot_identifier with multiple other arguments #5621

Merged
merged 1 commit into from
Aug 22, 2018

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Aug 21, 2018

Closes #2869
Fixes #2859
Reference (this is the first half of these issues -- pending-reboot issue to be fixed after): #218, #1494, #1510

Previously:

--- FAIL: TestAccAWSDBInstance_SnapshotIdentifier_BackupRetentionPeriod (1154.50s)
	testing.go:527: Step 0 error: Check failed: Check 4/4 error: aws_db_instance.test: Attribute 'backup_retention_period' expected "1", got "0"
--- FAIL: TestAccAWSDBInstance_SnapshotIdentifier_BackupWindow (1195.82s)
	testing.go:527: Step 0 error: Check failed: Check 4/4 error: aws_db_instance.test: Attribute 'backup_window' expected "00:00-08:00", got "06:13-06:43"
--- FAIL: TestAccAWSDBInstance_SnapshotIdentifier_IamDatabaseAuthenticationEnabled (1113.22s)
	testing.go:527: Step 0 error: Check failed: Check 4/4 error: aws_db_instance.test: Attribute 'iam_database_authentication_enabled' expected "true", got "false"
--- FAIL: TestAccAWSDBInstance_SnapshotIdentifier_MaintenanceWindow (1259.26s)
	testing.go:527: Step 0 error: Check failed: Check 4/4 error: aws_db_instance.test: Attribute 'maintenance_window' expected "Sun:01:00-Sun:01:30", got "wed:10:33-wed:11:03"
--- FAIL: TestAccAWSDBInstance_SnapshotIdentifier_Monitoring (1214.60s)
	testing.go:527: Step 0 error: Check failed: Check 4/4 error: aws_db_instance.test: Attribute 'monitoring_interval' expected "5", got "0"
--- FAIL: TestAccAWSDBInstance_SnapshotIdentifier_ParameterGroupName (1134.54s)
	testing.go:527: Step 0 error: Check failed: Check 4/4 error: aws_db_instance.test: Attribute 'parameter_group_name' expected "tf-acc-test-4546585708384390733", got "default.mariadb10.2"

Changes proposed in this pull request:

  • Ensure the following Terraform arguments trigger ModifyDBInstance when using RestoreDBInstanceFromDBSnapshot
    • backup_retention_period
    • backup_window
    • iam_database_authentication_enabled
    • maintenance_window
    • monitoring_interval
    • monitoring_role_arn
    • parameter_group_name

Output from acceptance testing:

34 tests passed (all tests)
--- PASS: TestAccAWSDBInstance_importBasic (441.25s)
--- PASS: TestAccAWSDBInstance_iamAuth (451.00s)
--- PASS: TestAccAWSDBInstance_generatedName (471.69s)
--- PASS: TestAccAWSDBInstance_basic (511.88s)
--- PASS: TestAccAWSDBInstance_namePrefix (512.04s)
--- PASS: TestAccAWSDBInstance_kmsKey (520.80s)
--- PASS: TestAccAWSDBInstance_optionGroup (542.32s)
--- PASS: TestAccAWSDBInstance_noSnapshot (663.43s)
--- PASS: TestAccAWSDBInstance_s3 (837.33s)
--- PASS: TestAccAWSDBInstance_subnetGroup (905.89s)
--- PASS: TestAccAWSDBInstance_snapshot (986.80s)
--- PASS: TestAccAWSDBInstance_portUpdate (552.60s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier (1159.29s)
--- PASS: TestAccAWSDBInstance_separate_iops_update (664.15s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_MaintenanceWindow (1209.77s)
--- PASS: TestAccAWSDBInstance_MinorVersion (449.18s)
--- PASS: TestAccAWSDBInstance_enhancedMonitoring (777.38s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_IamDatabaseAuthenticationEnabled (1329.91s)
--- PASS: TestAccAWSDBInstance_diffSuppressInitialState (448.94s)
--- PASS: TestAccAWSDBInstance_replica (1372.02s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_BackupWindow (1491.56s)
--- PASS: TestAccAWSDBInstance_ec2Classic (523.50s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_Monitoring (1524.52s)
--- PASS: TestAccAWSDBInstance_cloudwatchLogsExportConfiguration (453.37s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_BackupRetentionPeriod (1664.06s)
--- PASS: TestAccAWSDBInstance_cloudwatchLogsExportConfigurationUpdate (577.94s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_ParameterGroupName (1309.21s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_Tags (1348.55s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_VpcSecurityGroupIds (1350.06s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_VpcSecurityGroupIds_Tags (1380.31s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_MultiAZ (1936.30s)
--- PASS: TestAccAWSDBInstance_EnabledCloudwatchLogsExports_Oracle (782.88s)
--- PASS: TestAccAWSDBInstance_MSSQL_TZ (3030.58s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_MultiAZ_SQLServer (3984.31s)

@bflad bflad added bug Addresses a defect in current functionality. service/rds Issues and PRs that pertain to the rds service. labels Aug 21, 2018
@bflad bflad requested a review from a team August 21, 2018 03:01
@ghost ghost added the size/L Managed by automation to categorize the size of a PR. label Aug 21, 2018
…r with multiple other arguments

* backup_retention_period
* backup_window
* iam_database_authentication_enabled
* maintenance_window
* monitoring_interval
* monitoring_role_arn
* parameter_group_name

Previously:

```
--- FAIL: TestAccAWSDBInstance_SnapshotIdentifier_BackupRetentionPeriod (1154.50s)
	testing.go:527: Step 0 error: Check failed: Check 4/4 error: aws_db_instance.test: Attribute 'backup_retention_period' expected "1", got "0"
--- FAIL: TestAccAWSDBInstance_SnapshotIdentifier_BackupWindow (1195.82s)
	testing.go:527: Step 0 error: Check failed: Check 4/4 error: aws_db_instance.test: Attribute 'backup_window' expected "00:00-08:00", got "06:13-06:43"
--- FAIL: TestAccAWSDBInstance_SnapshotIdentifier_IamDatabaseAuthenticationEnabled (1113.22s)
	testing.go:527: Step 0 error: Check failed: Check 4/4 error: aws_db_instance.test: Attribute 'iam_database_authentication_enabled' expected "true", got "false"
--- FAIL: TestAccAWSDBInstance_SnapshotIdentifier_MaintenanceWindow (1259.26s)
	testing.go:527: Step 0 error: Check failed: Check 4/4 error: aws_db_instance.test: Attribute 'maintenance_window' expected "Sun:01:00-Sun:01:30", got "wed:10:33-wed:11:03"
--- FAIL: TestAccAWSDBInstance_SnapshotIdentifier_Monitoring (1214.60s)
	testing.go:527: Step 0 error: Check failed: Check 4/4 error: aws_db_instance.test: Attribute 'monitoring_interval' expected "5", got "0"
--- FAIL: TestAccAWSDBInstance_SnapshotIdentifier_ParameterGroupName (1134.54s)
	testing.go:527: Step 0 error: Check failed: Check 4/4 error: aws_db_instance.test: Attribute 'parameter_group_name' expected "tf-acc-test-4546585708384390733", got "default.mariadb10.2"
```
@bflad bflad force-pushed the b-aws_db_instance-snapshot_identifier-2x branch from ba29e0d to 09be94f Compare August 21, 2018 12:19
@ghost ghost added the size/L Managed by automation to categorize the size of a PR. label Aug 21, 2018
Copy link
Member

@mbfrahry mbfrahry left a comment

Choose a reason for hiding this comment

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

LGTM

@bflad bflad added this to the v1.33.0 milestone Aug 22, 2018
@bflad bflad merged commit 7b0a1d4 into master Aug 22, 2018
@bflad bflad deleted the b-aws_db_instance-snapshot_identifier-2x branch August 22, 2018 13:30
bflad added a commit that referenced this pull request Aug 22, 2018
@ghost
Copy link

ghost commented Apr 3, 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 Apr 3, 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/L Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws_db_instance parameter_group_name Ignored
2 participants