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 with replicate_source_db, prevent pending-reboot on creation with parameter_group_name #5672

Merged
merged 1 commit into from
Aug 30, 2018

Commits on Aug 27, 2018

  1. resource/aws_db_instance: Prevent double apply with replicate_source_…

    …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"
    ```
    bflad committed Aug 27, 2018
    Configuration menu
    Copy the full SHA
    d90aa04 View commit details
    Browse the repository at this point in the history