Skip to content

Commit 86ba57c

Browse files
committed
Remove 'TestAccVPCSecurityGroup_drift'.
1 parent 63cf00d commit 86ba57c

File tree

1 file changed

+0
-80
lines changed

1 file changed

+0
-80
lines changed

internal/service/ec2/vpc_security_group_test.go

-80
Original file line numberDiff line numberDiff line change
@@ -1594,60 +1594,6 @@ func TestAccVPCSecurityGroup_defaultEgressVPC(t *testing.T) {
15941594
}
15951595

15961596
// Testing drift detection with groups containing the same port and types
1597-
func TestAccVPCSecurityGroup_drift(t *testing.T) {
1598-
var group ec2.SecurityGroup
1599-
resourceName := "aws_security_group.test"
1600-
rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix)
1601-
1602-
resource.ParallelTest(t, resource.TestCase{
1603-
PreCheck: func() { acctest.PreCheck(t) },
1604-
ErrorCheck: acctest.ErrorCheck(t, ec2.EndpointsID),
1605-
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories,
1606-
CheckDestroy: testAccCheckSecurityGroupDestroy,
1607-
Steps: []resource.TestStep{
1608-
{
1609-
Config: testAccVPCSecurityGroupConfig_drift(rName),
1610-
Check: resource.ComposeTestCheckFunc(
1611-
testAccCheckSecurityGroupExists(resourceName, &group),
1612-
resource.TestCheckResourceAttr(resourceName, "egress.#", "0"),
1613-
resource.TestCheckResourceAttr(resourceName, "ingress.#", "2"),
1614-
resource.TestCheckTypeSetElemNestedAttrs(resourceName, "ingress.*", map[string]string{
1615-
"cidr_blocks.#": "1",
1616-
"cidr_blocks.0": "10.0.0.0/8",
1617-
"description": "",
1618-
"from_port": "80",
1619-
"ipv6_cidr_blocks.#": "0",
1620-
"protocol": "tcp",
1621-
"security_groups.#": "0",
1622-
"self": "false",
1623-
"to_port": "8000",
1624-
}),
1625-
resource.TestCheckTypeSetElemNestedAttrs(resourceName, "ingress.*", map[string]string{
1626-
"cidr_blocks.#": "1",
1627-
"cidr_blocks.0": "206.0.0.0/8",
1628-
"description": "",
1629-
"from_port": "80",
1630-
"ipv6_cidr_blocks.#": "0",
1631-
"protocol": "tcp",
1632-
"security_groups.#": "0",
1633-
"self": "false",
1634-
"to_port": "8000",
1635-
}),
1636-
),
1637-
},
1638-
{
1639-
ResourceName: resourceName,
1640-
ImportState: true,
1641-
// In rules with cidr_block drift, import only creates a single ingress
1642-
// rule with the cidr_blocks de-normalized. During subsequent apply, its
1643-
// normalized to create the 2 ingress rules seen in checks above.
1644-
ImportStateVerify: true,
1645-
ImportStateVerifyIgnore: []string{"revoke_rules_on_delete", "ingress", "egress"},
1646-
},
1647-
},
1648-
})
1649-
}
1650-
16511597
func TestAccVPCSecurityGroup_driftComplex(t *testing.T) {
16521598
var group ec2.SecurityGroup
16531599
resourceName := "aws_security_group.test1"
@@ -3156,32 +3102,6 @@ resource "aws_security_group" "test" {
31563102
`, rName)
31573103
}
31583104

3159-
func testAccVPCSecurityGroupConfig_drift(rName string) string {
3160-
return fmt.Sprintf(`
3161-
resource "aws_security_group" "test" {
3162-
name = %[1]q
3163-
3164-
ingress {
3165-
protocol = "tcp"
3166-
from_port = 80
3167-
to_port = 8000
3168-
cidr_blocks = ["10.0.0.0/8"]
3169-
}
3170-
3171-
ingress {
3172-
protocol = "tcp"
3173-
from_port = 80
3174-
to_port = 8000
3175-
cidr_blocks = ["206.0.0.0/8"]
3176-
}
3177-
3178-
tags = {
3179-
Name = %[1]q
3180-
}
3181-
}
3182-
`, rName)
3183-
}
3184-
31853105
func testAccVPCSecurityGroupConfig_driftComplex(rName string) string {
31863106
return fmt.Sprintf(`
31873107
resource "aws_vpc" "test" {

0 commit comments

Comments
 (0)