From 9b73044b3044d417445b819bb11f99dc05b114e1 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Tue, 16 Feb 2021 17:44:57 -0500 Subject: [PATCH 1/4] r/aws_ebs_volume: Consolidate some test configurations. Acceptance test output: $ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSEBSVolume_gp3' ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSEBSVolume_gp3 -timeout 120m === RUN TestAccAWSEBSVolume_gp3_basic === PAUSE TestAccAWSEBSVolume_gp3_basic === RUN TestAccAWSEBSVolume_gp3_iops === PAUSE TestAccAWSEBSVolume_gp3_iops === RUN TestAccAWSEBSVolume_gp3_throughput === PAUSE TestAccAWSEBSVolume_gp3_throughput === CONT TestAccAWSEBSVolume_gp3_basic === CONT TestAccAWSEBSVolume_gp3_throughput === CONT TestAccAWSEBSVolume_gp3_iops --- PASS: TestAccAWSEBSVolume_gp3_basic (32.65s) --- PASS: TestAccAWSEBSVolume_gp3_iops (55.98s) --- PASS: TestAccAWSEBSVolume_gp3_throughput (56.83s) PASS ok github.com/terraform-providers/terraform-provider-aws/aws 56.910s --- aws/resource_aws_ebs_volume_test.go | 63 +++++++++-------------------- 1 file changed, 20 insertions(+), 43 deletions(-) diff --git a/aws/resource_aws_ebs_volume_test.go b/aws/resource_aws_ebs_volume_test.go index 2d5f2919518..c235d0d436d 100644 --- a/aws/resource_aws_ebs_volume_test.go +++ b/aws/resource_aws_ebs_volume_test.go @@ -457,7 +457,7 @@ func TestAccAWSEBSVolume_gp3_basic(t *testing.T) { CheckDestroy: testAccCheckVolumeDestroy, Steps: []resource.TestStep{ { - Config: testAccAwsEbsVolumeConfigSizeType(rName, 10, "gp3"), + Config: testAccAwsEbsVolumeConfigSizeTypeIopsThroughput(rName, "10", "gp3", "", ""), Check: resource.ComposeTestCheckFunc( testAccCheckVolumeExists(resourceName, &v), testAccMatchResourceAttrRegionalARN(resourceName, "arn", "ec2", regexp.MustCompile(`volume/vol-.+`)), @@ -495,7 +495,7 @@ func TestAccAWSEBSVolume_gp3_iops(t *testing.T) { CheckDestroy: testAccCheckVolumeDestroy, Steps: []resource.TestStep{ { - Config: testAccAwsEbsVolumeConfigGp3Iops(rName, 4000), + Config: testAccAwsEbsVolumeConfigSizeTypeIopsThroughput(rName, "10", "gp3", "4000", "200"), Check: resource.ComposeTestCheckFunc( testAccCheckVolumeExists(resourceName, &v), testAccMatchResourceAttrRegionalARN(resourceName, "arn", "ec2", regexp.MustCompile(`volume/vol-.+`)), @@ -518,7 +518,7 @@ func TestAccAWSEBSVolume_gp3_iops(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccAwsEbsVolumeConfigGp3Iops(rName, 5000), + Config: testAccAwsEbsVolumeConfigSizeTypeIopsThroughput(rName, "10", "gp3", "5000", "200"), Check: resource.ComposeTestCheckFunc( testAccCheckVolumeExists(resourceName, &v), testAccMatchResourceAttrRegionalARN(resourceName, "arn", "ec2", regexp.MustCompile(`volume/vol-.+`)), @@ -551,7 +551,7 @@ func TestAccAWSEBSVolume_gp3_throughput(t *testing.T) { CheckDestroy: testAccCheckVolumeDestroy, Steps: []resource.TestStep{ { - Config: testAccAwsEbsVolumeConfigGp3Throughput(rName, 400), + Config: testAccAwsEbsVolumeConfigSizeTypeIopsThroughput(rName, "10", "gp3", "", "400"), Check: resource.ComposeTestCheckFunc( testAccCheckVolumeExists(resourceName, &v), testAccMatchResourceAttrRegionalARN(resourceName, "arn", "ec2", regexp.MustCompile(`volume/vol-.+`)), @@ -574,7 +574,7 @@ func TestAccAWSEBSVolume_gp3_throughput(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccAwsEbsVolumeConfigGp3Throughput(rName, 600), + Config: testAccAwsEbsVolumeConfigSizeTypeIopsThroughput(rName, "10", "gp3", "", "600"), Check: resource.ComposeTestCheckFunc( testAccCheckVolumeExists(resourceName, &v), testAccMatchResourceAttrRegionalARN(resourceName, "arn", "ec2", regexp.MustCompile(`volume/vol-.+`)), @@ -1194,55 +1194,32 @@ resource "aws_ebs_volume" "test" { `, rName) } -func testAccAwsEbsVolumeConfigSizeType(rName string, size int, volumeType string) string { - return composeConfig( - testAccAvailableAZsNoOptInConfig(), - fmt.Sprintf(` -resource "aws_ebs_volume" "test" { - availability_zone = data.aws_availability_zones.available.names[0] - type = %[3]q - size = %[2]d - - tags = { - Name = %[1]q - } -} -`, rName, size, volumeType)) -} - -func testAccAwsEbsVolumeConfigGp3Throughput(rName string, throughput int) string { - return composeConfig( - testAccAvailableAZsNoOptInConfig(), - fmt.Sprintf(` -resource "aws_ebs_volume" "test" { - availability_zone = data.aws_availability_zones.available.names[0] - type = "gp3" - size = 10 - throughput = %[2]d - - tags = { - Name = %[1]q - } -} -`, rName, throughput)) -} +func testAccAwsEbsVolumeConfigSizeTypeIopsThroughput(rName, size, volumeType, iops, throughput string) string { + if volumeType == "" { + volumeType = "null" + } + if iops == "" { + iops = "null" + } + if throughput == "" { + throughput = "null" + } -func testAccAwsEbsVolumeConfigGp3Iops(rName string, iops int) string { return composeConfig( testAccAvailableAZsNoOptInConfig(), fmt.Sprintf(` resource "aws_ebs_volume" "test" { availability_zone = data.aws_availability_zones.available.names[0] - type = "gp3" - iops = %[2]d - size = 10 - throughput = 200 + size = %[2]s + type = %[3]q + iops = %[4]s + throughput = %[5]s tags = { Name = %[1]q } } -`, rName, iops)) +`, rName, size, volumeType, iops, throughput)) } func testAccAwsEbsVolumeConfigSnapshotId(rName string) string { From b5ed4fa90b1942e78e623191a5cda86bc64d1a97 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Tue, 16 Feb 2021 18:08:23 -0500 Subject: [PATCH 2/4] r/aws_ebs_volume: Only specify throughput on update for gp3 volumes. Acceptance test output: $ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSEBSVolume_' ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSEBSVolume_ -timeout 120m === RUN TestAccAWSEBSVolume_basic === PAUSE TestAccAWSEBSVolume_basic === RUN TestAccAWSEBSVolume_updateAttachedEbsVolume === PAUSE TestAccAWSEBSVolume_updateAttachedEbsVolume === RUN TestAccAWSEBSVolume_updateSize === PAUSE TestAccAWSEBSVolume_updateSize === RUN TestAccAWSEBSVolume_updateType === PAUSE TestAccAWSEBSVolume_updateType === RUN TestAccAWSEBSVolume_updateIops_Io1 === PAUSE TestAccAWSEBSVolume_updateIops_Io1 === RUN TestAccAWSEBSVolume_updateIops_Io2 === PAUSE TestAccAWSEBSVolume_updateIops_Io2 === RUN TestAccAWSEBSVolume_kmsKey === PAUSE TestAccAWSEBSVolume_kmsKey === RUN TestAccAWSEBSVolume_NoIops === PAUSE TestAccAWSEBSVolume_NoIops === RUN TestAccAWSEBSVolume_InvalidIopsForType === PAUSE TestAccAWSEBSVolume_InvalidIopsForType === RUN TestAccAWSEBSVolume_InvalidThroughputForType === PAUSE TestAccAWSEBSVolume_InvalidThroughputForType === RUN TestAccAWSEBSVolume_withTags === PAUSE TestAccAWSEBSVolume_withTags === RUN TestAccAWSEBSVolume_multiAttach === PAUSE TestAccAWSEBSVolume_multiAttach === RUN TestAccAWSEBSVolume_outpost === PAUSE TestAccAWSEBSVolume_outpost === RUN TestAccAWSEBSVolume_gp3_basic === PAUSE TestAccAWSEBSVolume_gp3_basic === RUN TestAccAWSEBSVolume_gp3_iops === PAUSE TestAccAWSEBSVolume_gp3_iops === RUN TestAccAWSEBSVolume_gp3_throughput === PAUSE TestAccAWSEBSVolume_gp3_throughput === RUN TestAccAWSEBSVolume_gp3_to_gp2 === PAUSE TestAccAWSEBSVolume_gp3_to_gp2 === RUN TestAccAWSEBSVolume_snapshotID === PAUSE TestAccAWSEBSVolume_snapshotID === RUN TestAccAWSEBSVolume_snapshotIDAndSize === PAUSE TestAccAWSEBSVolume_snapshotIDAndSize === RUN TestAccAWSEBSVolume_disappears === PAUSE TestAccAWSEBSVolume_disappears === CONT TestAccAWSEBSVolume_basic === CONT TestAccAWSEBSVolume_disappears === CONT TestAccAWSEBSVolume_snapshotIDAndSize === CONT TestAccAWSEBSVolume_snapshotID === CONT TestAccAWSEBSVolume_gp3_to_gp2 === CONT TestAccAWSEBSVolume_gp3_throughput === CONT TestAccAWSEBSVolume_gp3_iops === CONT TestAccAWSEBSVolume_gp3_basic === CONT TestAccAWSEBSVolume_outpost === CONT TestAccAWSEBSVolume_multiAttach === CONT TestAccAWSEBSVolume_withTags === CONT TestAccAWSEBSVolume_InvalidThroughputForType === CONT TestAccAWSEBSVolume_InvalidIopsForType === CONT TestAccAWSEBSVolume_NoIops === CONT TestAccAWSEBSVolume_kmsKey === CONT TestAccAWSEBSVolume_updateIops_Io2 === CONT TestAccAWSEBSVolume_updateIops_Io1 === CONT TestAccAWSEBSVolume_updateType === CONT TestAccAWSEBSVolume_updateSize === CONT TestAccAWSEBSVolume_updateAttachedEbsVolume === CONT TestAccAWSEBSVolume_outpost data_source_aws_outposts_outposts_test.go:66: skipping since no Outposts found --- SKIP: TestAccAWSEBSVolume_outpost (1.29s) --- PASS: TestAccAWSEBSVolume_InvalidIopsForType (25.31s) --- PASS: TestAccAWSEBSVolume_InvalidThroughputForType (25.46s) --- PASS: TestAccAWSEBSVolume_disappears (64.80s) --- PASS: TestAccAWSEBSVolume_NoIops (74.88s) --- PASS: TestAccAWSEBSVolume_basic (75.05s) --- PASS: TestAccAWSEBSVolume_gp3_basic (81.10s) --- PASS: TestAccAWSEBSVolume_withTags (81.35s) --- PASS: TestAccAWSEBSVolume_multiAttach (81.90s) --- PASS: TestAccAWSEBSVolume_kmsKey (82.81s) --- PASS: TestAccAWSEBSVolume_snapshotID (89.43s) --- PASS: TestAccAWSEBSVolume_snapshotIDAndSize (93.87s) --- PASS: TestAccAWSEBSVolume_updateIops_Io1 (110.84s) --- PASS: TestAccAWSEBSVolume_gp3_throughput (116.39s) --- PASS: TestAccAWSEBSVolume_gp3_to_gp2 (116.82s) --- PASS: TestAccAWSEBSVolume_updateSize (118.95s) --- PASS: TestAccAWSEBSVolume_updateType (119.42s) --- PASS: TestAccAWSEBSVolume_gp3_iops (119.51s) --- PASS: TestAccAWSEBSVolume_updateIops_Io2 (119.88s) --- PASS: TestAccAWSEBSVolume_updateAttachedEbsVolume (216.09s) PASS ok github.com/terraform-providers/terraform-provider-aws/aws 216.236s --- aws/resource_aws_ebs_volume.go | 3 +- aws/resource_aws_ebs_volume_test.go | 56 +++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_ebs_volume.go b/aws/resource_aws_ebs_volume.go index 6b57529222d..561cda6125e 100644 --- a/aws/resource_aws_ebs_volume.go +++ b/aws/resource_aws_ebs_volume.go @@ -182,7 +182,8 @@ func resourceAWSEbsVolumeUpdate(d *schema.ResourceData, meta interface{}) error // "If no throughput value is specified, the existing value is retained." // Not currently correct, so always specify any non-zero throughput value. - if v := d.Get("throughput").(int); v > 0 { + // Throughput is valid only for gp3 volumes. + if v := d.Get("throughput").(int); v > 0 && d.Get("type").(string) == ec2.VolumeTypeGp3 { params.Throughput = aws.Int64(int64(v)) } diff --git a/aws/resource_aws_ebs_volume_test.go b/aws/resource_aws_ebs_volume_test.go index c235d0d436d..de68cfb7786 100644 --- a/aws/resource_aws_ebs_volume_test.go +++ b/aws/resource_aws_ebs_volume_test.go @@ -595,6 +595,62 @@ func TestAccAWSEBSVolume_gp3_throughput(t *testing.T) { }) } +func TestAccAWSEBSVolume_gp3_to_gp2(t *testing.T) { + var v ec2.Volume + resourceName := "aws_ebs_volume.test" + rName := acctest.RandomWithPrefix("tf-acc-test") + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + IDRefreshName: resourceName, + Providers: testAccProviders, + CheckDestroy: testAccCheckVolumeDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsEbsVolumeConfigSizeTypeIopsThroughput(rName, "10", "gp3", "3000", "400"), + Check: resource.ComposeTestCheckFunc( + testAccCheckVolumeExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "ec2", regexp.MustCompile(`volume/vol-.+`)), + resource.TestCheckResourceAttr(resourceName, "encrypted", "false"), + resource.TestCheckResourceAttr(resourceName, "iops", "3000"), + resource.TestCheckResourceAttr(resourceName, "kms_key_id", ""), + resource.TestCheckResourceAttr(resourceName, "multi_attach_enabled", "false"), + resource.TestCheckResourceAttr(resourceName, "outpost_arn", ""), + resource.TestCheckResourceAttr(resourceName, "size", "10"), + resource.TestCheckResourceAttr(resourceName, "snapshot_id", ""), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.Name", rName), + resource.TestCheckResourceAttr(resourceName, "throughput", "400"), + resource.TestCheckResourceAttr(resourceName, "type", "gp3"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + { + Config: testAccAwsEbsVolumeConfigSizeTypeIopsThroughput(rName, "10", "gp2", "", ""), + Check: resource.ComposeTestCheckFunc( + testAccCheckVolumeExists(resourceName, &v), + testAccMatchResourceAttrRegionalARN(resourceName, "arn", "ec2", regexp.MustCompile(`volume/vol-.+`)), + resource.TestCheckResourceAttr(resourceName, "encrypted", "false"), + resource.TestCheckResourceAttr(resourceName, "iops", "100"), + resource.TestCheckResourceAttr(resourceName, "kms_key_id", ""), + resource.TestCheckResourceAttr(resourceName, "multi_attach_enabled", "false"), + resource.TestCheckResourceAttr(resourceName, "outpost_arn", ""), + resource.TestCheckResourceAttr(resourceName, "size", "10"), + resource.TestCheckResourceAttr(resourceName, "snapshot_id", ""), + resource.TestCheckResourceAttr(resourceName, "tags.%", "1"), + resource.TestCheckResourceAttr(resourceName, "tags.Name", rName), + resource.TestCheckResourceAttr(resourceName, "throughput", "0"), + resource.TestCheckResourceAttr(resourceName, "type", "gp2"), + ), + }, + }, + }) +} + func TestAccAWSEBSVolume_snapshotID(t *testing.T) { var v ec2.Volume resourceName := "aws_ebs_volume.test" From 87071aae85b65bf9e94cbcc74a42c200e49a7588 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Tue, 16 Feb 2021 18:12:33 -0500 Subject: [PATCH 3/4] Add CHANGELOG entry. --- .changelog/17646.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/17646.txt diff --git a/.changelog/17646.txt b/.changelog/17646.txt new file mode 100644 index 00000000000..ad545ad6a4c --- /dev/null +++ b/.changelog/17646.txt @@ -0,0 +1,3 @@ +```release-note:bug +resource/aws_ebs_volume: Only specify throughput on update for `gp3` volumes +``` From e64a60bf25c14c8d7962b24766e45044da3a11d2 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Thu, 18 Feb 2021 17:35:03 -0500 Subject: [PATCH 4/4] tests/ebs_volume: Skip unsupported GovCloud tests --- aws/resource_aws_ebs_volume_test.go | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/aws/resource_aws_ebs_volume_test.go b/aws/resource_aws_ebs_volume_test.go index de68cfb7786..2b844b20976 100644 --- a/aws/resource_aws_ebs_volume_test.go +++ b/aws/resource_aws_ebs_volume_test.go @@ -66,12 +66,21 @@ func testSweepEbsVolumes(region string) error { return nil } +// testAccErrorCheckSkipEBSVolume skips EBS volume tests that have error messages indicating unsupported features +func testAccErrorCheckSkipEBSVolume(t *testing.T) resource.ErrorCheckFunc { + return testAccErrorCheckSkipMessagesContaining(t, + "specified zone does not support multi-attach-enabled volumes", + "Unsupported volume type", + ) +} + func TestAccAWSEBSVolume_basic(t *testing.T) { var v ec2.Volume resourceName := "aws_ebs_volume.test" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, + ErrorCheck: testAccErrorCheckSkipEBSVolume(t), IDRefreshName: resourceName, Providers: testAccProviders, CheckDestroy: testAccCheckVolumeDestroy, @@ -107,6 +116,7 @@ func TestAccAWSEBSVolume_updateAttachedEbsVolume(t *testing.T) { resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, + ErrorCheck: testAccErrorCheckSkipEBSVolume(t), IDRefreshName: resourceName, Providers: testAccProviders, CheckDestroy: testAccCheckVolumeDestroy, @@ -142,6 +152,7 @@ func TestAccAWSEBSVolume_updateSize(t *testing.T) { resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, + ErrorCheck: testAccErrorCheckSkipEBSVolume(t), IDRefreshName: resourceName, Providers: testAccProviders, CheckDestroy: testAccCheckVolumeDestroy, @@ -177,6 +188,7 @@ func TestAccAWSEBSVolume_updateType(t *testing.T) { resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, + ErrorCheck: testAccErrorCheckSkipEBSVolume(t), IDRefreshName: resourceName, Providers: testAccProviders, CheckDestroy: testAccCheckVolumeDestroy, @@ -212,6 +224,7 @@ func TestAccAWSEBSVolume_updateIops_Io1(t *testing.T) { resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, + ErrorCheck: testAccErrorCheckSkipEBSVolume(t), IDRefreshName: resourceName, Providers: testAccProviders, CheckDestroy: testAccCheckVolumeDestroy, @@ -247,6 +260,7 @@ func TestAccAWSEBSVolume_updateIops_Io2(t *testing.T) { resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, + ErrorCheck: testAccErrorCheckSkipEBSVolume(t), IDRefreshName: resourceName, Providers: testAccProviders, CheckDestroy: testAccCheckVolumeDestroy, @@ -285,6 +299,7 @@ func TestAccAWSEBSVolume_kmsKey(t *testing.T) { resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, + ErrorCheck: testAccErrorCheckSkipEBSVolume(t), IDRefreshName: resourceName, Providers: testAccProviders, CheckDestroy: testAccCheckVolumeDestroy, @@ -313,6 +328,7 @@ func TestAccAWSEBSVolume_NoIops(t *testing.T) { resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, + ErrorCheck: testAccErrorCheckSkipEBSVolume(t), Providers: testAccProviders, CheckDestroy: testAccCheckVolumeDestroy, Steps: []resource.TestStep{ @@ -337,6 +353,7 @@ func TestAccAWSEBSVolume_InvalidIopsForType(t *testing.T) { resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, + ErrorCheck: testAccErrorCheckSkipEBSVolume(t), Providers: testAccProviders, CheckDestroy: testAccCheckVolumeDestroy, Steps: []resource.TestStep{ @@ -352,6 +369,7 @@ func TestAccAWSEBSVolume_InvalidThroughputForType(t *testing.T) { resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, + ErrorCheck: testAccErrorCheckSkipEBSVolume(t), Providers: testAccProviders, CheckDestroy: testAccCheckVolumeDestroy, Steps: []resource.TestStep{ @@ -369,6 +387,7 @@ func TestAccAWSEBSVolume_withTags(t *testing.T) { resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, + ErrorCheck: testAccErrorCheckSkipEBSVolume(t), IDRefreshName: resourceName, Providers: testAccProviders, CheckDestroy: testAccCheckVolumeDestroy, @@ -397,6 +416,7 @@ func TestAccAWSEBSVolume_multiAttach(t *testing.T) { resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, + ErrorCheck: testAccErrorCheckSkipEBSVolume(t), IDRefreshName: resourceName, Providers: testAccProviders, CheckDestroy: testAccCheckVolumeDestroy, @@ -425,6 +445,7 @@ func TestAccAWSEBSVolume_outpost(t *testing.T) { resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSOutpostsOutposts(t) }, + ErrorCheck: testAccErrorCheckSkipEBSVolume(t), IDRefreshName: resourceName, Providers: testAccProviders, CheckDestroy: testAccCheckVolumeDestroy, @@ -452,6 +473,7 @@ func TestAccAWSEBSVolume_gp3_basic(t *testing.T) { resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, + ErrorCheck: testAccErrorCheckSkipEBSVolume(t), IDRefreshName: resourceName, Providers: testAccProviders, CheckDestroy: testAccCheckVolumeDestroy, @@ -490,6 +512,7 @@ func TestAccAWSEBSVolume_gp3_iops(t *testing.T) { resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, + ErrorCheck: testAccErrorCheckSkipEBSVolume(t), IDRefreshName: resourceName, Providers: testAccProviders, CheckDestroy: testAccCheckVolumeDestroy, @@ -546,6 +569,7 @@ func TestAccAWSEBSVolume_gp3_throughput(t *testing.T) { resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, + ErrorCheck: testAccErrorCheckSkipEBSVolume(t), IDRefreshName: resourceName, Providers: testAccProviders, CheckDestroy: testAccCheckVolumeDestroy, @@ -602,6 +626,7 @@ func TestAccAWSEBSVolume_gp3_to_gp2(t *testing.T) { resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, + ErrorCheck: testAccErrorCheckSkipEBSVolume(t), IDRefreshName: resourceName, Providers: testAccProviders, CheckDestroy: testAccCheckVolumeDestroy, @@ -659,6 +684,7 @@ func TestAccAWSEBSVolume_snapshotID(t *testing.T) { resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, + ErrorCheck: testAccErrorCheckSkipEBSVolume(t), IDRefreshName: resourceName, Providers: testAccProviders, CheckDestroy: testAccCheckVolumeDestroy, @@ -698,6 +724,7 @@ func TestAccAWSEBSVolume_snapshotIDAndSize(t *testing.T) { resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, + ErrorCheck: testAccErrorCheckSkipEBSVolume(t), IDRefreshName: resourceName, Providers: testAccProviders, CheckDestroy: testAccCheckVolumeDestroy, @@ -735,6 +762,7 @@ func TestAccAWSEBSVolume_disappears(t *testing.T) { resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, + ErrorCheck: testAccErrorCheckSkipEBSVolume(t), Providers: testAccProviders, CheckDestroy: testAccCheckVolumeDestroy, Steps: []resource.TestStep{