update sg rule ids
This commit is contained in:
parent
03aac9f42b
commit
9f3a17e9b4
|
@ -373,7 +373,7 @@ func ipPermissionIDHash(sg_id, ruleType string, ip *ec2.IpPermission) string {
|
|||
}
|
||||
}
|
||||
|
||||
return fmt.Sprintf("sg-%d", hashcode.String(buf.String()))
|
||||
return fmt.Sprintf("sgrule-%d", hashcode.String(buf.String()))
|
||||
}
|
||||
|
||||
func expandIPPerm(d *schema.ResourceData, sg *ec2.SecurityGroup) *ec2.IpPermission {
|
||||
|
|
|
@ -90,11 +90,11 @@ func TestIpPermissionIDHash(t *testing.T) {
|
|||
Type string
|
||||
Output string
|
||||
}{
|
||||
{simple, "ingress", "sg-3403497314"},
|
||||
{egress, "egress", "sg-1173186295"},
|
||||
{egress_all, "egress", "sg-766323498"},
|
||||
{vpc_security_group_source, "egress", "sg-351225364"},
|
||||
{security_group_source, "egress", "sg-2198807188"},
|
||||
{simple, "ingress", "sgrule-3403497314"},
|
||||
{egress, "egress", "sgrule-1173186295"},
|
||||
{egress_all, "egress", "sgrule-766323498"},
|
||||
{vpc_security_group_source, "egress", "sgrule-351225364"},
|
||||
{security_group_source, "egress", "sgrule-2198807188"},
|
||||
}
|
||||
|
||||
for _, tc := range cases {
|
||||
|
|
Loading…
Reference in New Issue