-
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
resource/aws_db_instance: Prevent double apply with replicate_source_db, prevent pending-reboot on creation with parameter_group_name #5672
Conversation
…db, prevent pending-reboot on creation with parameter_group_name * Add ModifyDBInstance call to CreateDBInstanceReadReplica if necessary * Add RebootDBInstance call after ModifyDBInstance if necessary * Refactor to not call update function during create function * Additional acceptance testing with snapshot_identifier with allocated_storage, availability_zone, auto_minor_version_upgrade, and port Previously: ``` --- FAIL: TestAccAWSDBInstance_SnapshotIdentifier_AllocatedStorage (1160.55s) testing.go:527: Step 0 error: Check failed: Check 4/4 error: aws_db_instance.test: Attribute 'allocated_storage' expected "10", got "5" --- FAIL: TestAccAWSDBInstance_ReplicateSourceDb_AllocatedStorage (1433.85s) testing.go:527: Step 0 error: Check failed: Check 4/4 error: aws_db_instance.test: Attribute 'allocated_storage' expected "10", got "5" --- FAIL: TestAccAWSDBInstance_ReplicateSourceDb_AutoMinorVersionUpgrade (1707.73s) testing.go:527: Step 0 error: Check failed: Check 4/4 error: aws_db_instance.test: Attribute 'auto_minor_version_upgrade' expected "false", got "true" --- FAIL: TestAccAWSDBInstance_ReplicateSourceDb_BackupRetentionPeriod (1336.28s) 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_ReplicateSourceDb_BackupWindow (1451.16s) 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 "08:31-09:01" --- FAIL: TestAccAWSDBInstance_ReplicateSourceDb_IamDatabaseAuthenticationEnabled (1525.07s) 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_ReplicateSourceDb_MaintenanceWindow (1695.94s) 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 "sat:07:22-sat:07:52" --- FAIL: TestAccAWSDBInstance_ReplicateSourceDb_MultiAZ (1802.71s) testing.go:527: Step 0 error: Check failed: Check 4/4 error: aws_db_instance.test: Attribute 'multi_az' expected "true", got "false" --- FAIL: TestAccAWSDBInstance_ReplicateSourceDb_ParameterGroupName (1624.64s) testing.go:527: Step 0 error: Check failed: Check 4/4 error: aws_db_instance.test: Attribute 'parameter_group_name' expected "tf-acc-test-2677194822897355379", got "default.mysql5.7" --- FAIL: TestAccAWSDBInstance_ReplicateSourceDb_VpcSecurityGroupIds (1479.95s) testing.go:527: Step 0 error: After applying this step, the plan was not empty: DIFF: UPDATE: aws_db_instance.test vpc_security_group_ids.1493394302: "" => "sg-0202c4194da544ffb" vpc_security_group_ids.81746784: "sg-1ca59078" => "" ``` Before RebootDBInstance addition: ``` --- FAIL: TestAccAWSDBInstance_SnapshotIdentifier_ParameterGroupName (1256.87s) testing.go:527: Step 0 error: Check failed: Check 5/5 error: expected DB Instance (tf-acc-test-8132994030462245505) Parameter Group (tf-acc-test-8132994030462245505) apply status to be: "in-sync", got: "pending-reboot" --- FAIL: TestAccAWSDBInstance_ReplicateSourceDb_ParameterGroupName (1761.14s) testing.go:527: Step 0 error: Check failed: Check 5/5 error: expected DB Instance (tf-acc-test-632112102194298217) Parameter Group (tf-acc-test-632112102194298217) apply status to be: "in-sync", got: "pending-reboot" ```
1883d7c
to
d90aa04
Compare
This has been released in version 1.34.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! |
Fixes #218
Fixes #263
Fixes #1329
Fixes #1494
Fixes #1510
Fixes #2909
Previously:
Before RebootDBInstance addition:
Changes proposed in this pull request:
ModifyDBInstance
call toCreateDBInstanceReadReplica
if necessaryRebootDBInstance
call afterModifyDBInstance
if necessarysnapshot_identifier
andallocated_storage
,availability_zone
,auto_minor_version_upgrade
, andport
Output from acceptance testing: