update sg rule ids

This commit is contained in:
Clint Shryock 2015-10-12 15:19:42 -05:00
parent 03aac9f42b
commit 9f3a17e9b4
5 changed files with 218 additions and 218 deletions

View File

@ -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 {

View File

@ -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 {