@@ -636,7 +636,7 @@ func TestAccRDSInstance_dbSubnetGroupName(t *testing.T) {
636
636
Config : testAccInstanceConfig_dbSubnetGroupName (rName ),
637
637
Check : resource .ComposeAggregateTestCheckFunc (
638
638
testAccCheckInstanceExists (ctx , resourceName , & dbInstance ),
639
- testAccCheckSubnetGroupExists (ctx , resourceName , & dbSubnetGroup ),
639
+ testAccCheckSubnetGroupExists (ctx , dbSubnetGroupResourceName , & dbSubnetGroup ),
640
640
resource .TestCheckResourceAttrPair (resourceName , "db_subnet_group_name" , dbSubnetGroupResourceName , "name" ),
641
641
),
642
642
},
@@ -698,7 +698,7 @@ func TestAccRDSInstance_DBSubnetGroupName_vpcSecurityGroupIDs(t *testing.T) {
698
698
Config : testAccInstanceConfig_DBSubnetGroupName_vpcSecurityGroupIDs (rName ),
699
699
Check : resource .ComposeAggregateTestCheckFunc (
700
700
testAccCheckInstanceExists (ctx , resourceName , & dbInstance ),
701
- testAccCheckSubnetGroupExists (ctx , resourceName , & dbSubnetGroup ),
701
+ testAccCheckSubnetGroupExists (ctx , dbSubnetGroupResourceName , & dbSubnetGroup ),
702
702
resource .TestCheckResourceAttrPair (resourceName , "db_subnet_group_name" , dbSubnetGroupResourceName , "name" ),
703
703
),
704
704
},
@@ -1530,7 +1530,7 @@ func TestAccRDSInstance_ReplicateSourceDB_dbSubnetGroupName(t *testing.T) {
1530
1530
Config : testAccInstanceConfig_ReplicateSourceDB_dbSubnetGroupName (rName ),
1531
1531
Check : resource .ComposeAggregateTestCheckFunc (
1532
1532
testAccCheckInstanceExists (ctx , resourceName , & dbInstance ),
1533
- testAccCheckSubnetGroupExists (ctx , resourceName , & dbSubnetGroup ),
1533
+ testAccCheckSubnetGroupExists (ctx , dbSubnetGroupResourceName , & dbSubnetGroup ),
1534
1534
resource .TestCheckResourceAttrPair (resourceName , "db_subnet_group_name" , dbSubnetGroupResourceName , "name" ),
1535
1535
),
1536
1536
},
@@ -1600,7 +1600,7 @@ func TestAccRDSInstance_ReplicateSourceDBDBSubnetGroupName_vpcSecurityGroupIDs(t
1600
1600
Config : testAccInstanceConfig_ReplicateSourceDB_DBSubnetGroupName_vpcSecurityGroupIDs (rName ),
1601
1601
Check : resource .ComposeAggregateTestCheckFunc (
1602
1602
testAccCheckInstanceExists (ctx , resourceName , & dbInstance ),
1603
- testAccCheckSubnetGroupExists (ctx , resourceName , & dbSubnetGroup ),
1603
+ testAccCheckSubnetGroupExists (ctx , dbSubnetGroupResourceName , & dbSubnetGroup ),
1604
1604
resource .TestCheckResourceAttrPair (resourceName , "db_subnet_group_name" , dbSubnetGroupResourceName , "name" ),
1605
1605
),
1606
1606
},
@@ -2700,7 +2700,7 @@ func TestAccRDSInstance_SnapshotIdentifier_dbSubnetGroupName(t *testing.T) {
2700
2700
testAccCheckInstanceExists (ctx , sourceDbResourceName , & sourceDbInstance ),
2701
2701
testAccCheckDBSnapshotExists (ctx , snapshotResourceName , & dbSnapshot ),
2702
2702
testAccCheckInstanceExists (ctx , resourceName , & dbInstance ),
2703
- testAccCheckSubnetGroupExists (ctx , resourceName , & dbSubnetGroup ),
2703
+ testAccCheckSubnetGroupExists (ctx , dbSubnetGroupResourceName , & dbSubnetGroup ),
2704
2704
resource .TestCheckResourceAttrPair (resourceName , "db_subnet_group_name" , dbSubnetGroupResourceName , "name" ),
2705
2705
),
2706
2706
},
@@ -2776,7 +2776,7 @@ func TestAccRDSInstance_SnapshotIdentifier_dbSubnetGroupNameVPCSecurityGroupIDs(
2776
2776
testAccCheckInstanceExists (ctx , sourceDbResourceName , & sourceDbInstance ),
2777
2777
testAccCheckDBSnapshotExists (ctx , snapshotResourceName , & dbSnapshot ),
2778
2778
testAccCheckInstanceExists (ctx , resourceName , & dbInstance ),
2779
- testAccCheckSubnetGroupExists (ctx , resourceName , & dbSubnetGroup ),
2779
+ testAccCheckSubnetGroupExists (ctx , dbSubnetGroupResourceName , & dbSubnetGroup ),
2780
2780
resource .TestCheckResourceAttrPair (resourceName , "db_subnet_group_name" , dbSubnetGroupResourceName , "name" ),
2781
2781
),
2782
2782
},
@@ -3653,8 +3653,8 @@ func TestAccRDSInstance_MySQL_snapshotRestoreWithEngineVersion(t *testing.T) {
3653
3653
Check : resource .ComposeAggregateTestCheckFunc (
3654
3654
testAccCheckInstanceExists (ctx , restoreResourceName , & vRestoredInstance ),
3655
3655
testAccCheckInstanceExists (ctx , resourceName , & v ),
3656
- // Hardcoded older version. Will to update when no longer compatible to upgrade from this to the default version.
3657
- resource .TestCheckResourceAttr (resourceName , "engine_version" , "8.0.25 " ),
3656
+ // Hardcoded older version. Will need to update when no longer compatible to upgrade from this to the default version.
3657
+ resource .TestCheckResourceAttr (resourceName , "engine_version" , "8.0.31 " ),
3658
3658
resource .TestCheckResourceAttrPair (restoreResourceName , "engine_version" , "data.aws_rds_engine_version.default" , "version" ),
3659
3659
),
3660
3660
},
@@ -5404,17 +5404,17 @@ func testAccCheckInstanceAutomatedBackupsDelete(ctx context.Context) resource.Te
5404
5404
5405
5405
log .Printf ("[INFO] Trying to locate the DBInstance Automated Backup" )
5406
5406
describeOutput , err := conn .DescribeDBInstanceAutomatedBackupsWithContext (ctx , & rds.DescribeDBInstanceAutomatedBackupsInput {
5407
- DBInstanceIdentifier : aws .String (rs .Primary .ID ),
5407
+ DBInstanceIdentifier : aws .String (rs .Primary .Attributes [ "identifier" ] ),
5408
5408
})
5409
5409
if err != nil {
5410
5410
return err
5411
5411
}
5412
5412
5413
5413
if describeOutput == nil || len (describeOutput .DBInstanceAutomatedBackups ) == 0 {
5414
- return fmt .Errorf ("Automated backup for %s not found" , rs .Primary .ID )
5414
+ return fmt .Errorf ("Automated backup for %s not found" , rs .Primary .Attributes [ "identifier" ] )
5415
5415
}
5416
5416
5417
- log .Printf ("[INFO] Deleting automated backup for %s" , rs .Primary .ID )
5417
+ log .Printf ("[INFO] Deleting automated backup for %s" , rs .Primary .Attributes [ "identifier" ] )
5418
5418
_ , err = conn .DeleteDBInstanceAutomatedBackupWithContext (ctx , & rds.DeleteDBInstanceAutomatedBackupInput {
5419
5419
DbiResourceId : describeOutput .DBInstanceAutomatedBackups [0 ].DbiResourceId ,
5420
5420
})
@@ -5436,7 +5436,7 @@ func testAccCheckInstanceDestroy(ctx context.Context) resource.TestCheckFunc {
5436
5436
continue
5437
5437
}
5438
5438
5439
- _ , err := tfrds .FindDBInstanceByID (ctx , conn , rs .Primary .ID )
5439
+ _ , err := tfrds .FindDBInstanceByID (ctx , conn , rs .Primary .Attributes [ "identifier" ] )
5440
5440
5441
5441
if tfresource .NotFound (err ) {
5442
5442
continue
@@ -5446,7 +5446,7 @@ func testAccCheckInstanceDestroy(ctx context.Context) resource.TestCheckFunc {
5446
5446
return err
5447
5447
}
5448
5448
5449
- return fmt .Errorf ("RDS DB Instance %s still exists" , rs .Primary .ID )
5449
+ return fmt .Errorf ("RDS DB Instance %s still exists" , rs .Primary .Attributes [ "identifier" ] )
5450
5450
}
5451
5451
5452
5452
return nil
@@ -5566,7 +5566,7 @@ func testAccCheckInstanceDestroyWithFinalSnapshot(ctx context.Context) resource.
5566
5566
return err
5567
5567
}
5568
5568
5569
- _ , err = tfrds .FindDBInstanceByID (ctx , conn , rs .Primary .ID )
5569
+ _ , err = tfrds .FindDBInstanceByID (ctx , conn , rs .Primary .Attributes [ "identifier" ] )
5570
5570
5571
5571
if tfresource .NotFound (err ) {
5572
5572
continue
@@ -5576,7 +5576,7 @@ func testAccCheckInstanceDestroyWithFinalSnapshot(ctx context.Context) resource.
5576
5576
return err
5577
5577
}
5578
5578
5579
- return fmt .Errorf ("RDS DB Instance %s still exists" , rs .Primary .ID )
5579
+ return fmt .Errorf ("RDS DB Instance %s still exists" , rs .Primary .Attributes [ "identifier" ] )
5580
5580
}
5581
5581
5582
5582
return nil
@@ -5606,7 +5606,7 @@ func testAccCheckInstanceDestroyWithoutFinalSnapshot(ctx context.Context) resour
5606
5606
return fmt .Errorf ("RDS DB Snapshot %s exists" , finalSnapshotID )
5607
5607
}
5608
5608
5609
- _ , err = tfrds .FindDBInstanceByID (ctx , conn , rs .Primary .ID )
5609
+ _ , err = tfrds .FindDBInstanceByID (ctx , conn , rs .Primary .Attributes [ "identifier" ] )
5610
5610
5611
5611
if tfresource .NotFound (err ) {
5612
5612
continue
@@ -5616,7 +5616,7 @@ func testAccCheckInstanceDestroyWithoutFinalSnapshot(ctx context.Context) resour
5616
5616
return err
5617
5617
}
5618
5618
5619
- return fmt .Errorf ("RDS DB Instance %s still exists" , rs .Primary .ID )
5619
+ return fmt .Errorf ("RDS DB Instance %s still exists" , rs .Primary .Attributes [ "identifier" ] )
5620
5620
}
5621
5621
5622
5622
return nil
@@ -5656,13 +5656,13 @@ func testAccCheckInstanceExists(ctx context.Context, n string, v *rds.DBInstance
5656
5656
return fmt .Errorf ("Not found: %s" , n )
5657
5657
}
5658
5658
5659
- if rs .Primary .ID == "" {
5659
+ if rs .Primary .Attributes [ "identifier" ] == "" {
5660
5660
return fmt .Errorf ("No RDS DB Instance ID is set" )
5661
5661
}
5662
5662
5663
5663
conn := acctest .Provider .Meta ().(* conns.AWSClient ).RDSConn ()
5664
5664
5665
- output , err := tfrds .FindDBInstanceByID (ctx , conn , rs .Primary .ID )
5665
+ output , err := tfrds .FindDBInstanceByID (ctx , conn , rs .Primary .Attributes [ "identifier" ] )
5666
5666
if err != nil {
5667
5667
return err
5668
5668
}
@@ -6910,7 +6910,7 @@ func testAccInstanceConfig_mySQLSnapshotRestoreEngineVersion(rName string) strin
6910
6910
resource "aws_db_instance" "test" {
6911
6911
allocated_storage = 20
6912
6912
engine = data.aws_rds_engine_version.default.engine
6913
- engine_version = "8.0.25 " # test is from older to newer version, update when restore from this to current default version is incompatible
6913
+ engine_version = "8.0.31 " # test is from older to newer version, update when restore from this to current default version is incompatible
6914
6914
identifier = %[1]q
6915
6915
instance_class = data.aws_rds_orderable_db_instance.test.instance_class
6916
6916
skip_final_snapshot = true
@@ -8894,7 +8894,7 @@ func testAccInstanceConfig_SnapshotID_io1Storage(rName string, iops int) string
8894
8894
return fmt .Sprintf (`
8895
8895
data "aws_rds_orderable_db_instance" "test" {
8896
8896
engine = "mariadb"
8897
- engine_version = "10.5 .12"
8897
+ engine_version = "10.6 .12"
8898
8898
license_model = "general-public-license"
8899
8899
storage_type = "io1"
8900
8900
@@ -10220,7 +10220,7 @@ data "aws_rds_orderable_db_instance" "test" {
10220
10220
10221
10221
data "aws_rds_engine_version" "initial" {
10222
10222
engine = "mysql"
10223
- preferred_versions = ["8.0.27 ", "8.0.26 ", "8.0.25 "]
10223
+ preferred_versions = ["8.0.32 ", "8.0.31 ", "8.0.30 "]
10224
10224
}
10225
10225
10226
10226
data "aws_rds_engine_version" "updated" {
0 commit comments