Test source_security_group_id for ELBs

This commit is contained in:
clint shryock 2015-11-06 11:18:57 -06:00
parent 9390674a05
commit c905bfef22
1 changed files with 9 additions and 0 deletions

View File

@ -611,6 +611,15 @@ func testAccCheckAWSELBExists(n string, res *elb.LoadBalancerDescription) resour
*res = *describe.LoadBalancerDescriptions[0] *res = *describe.LoadBalancerDescriptions[0]
// Confirm source_security_group_id for ELBs in a VPC
// See https://github.com/hashicorp/terraform/pull/3780
if res.VPCId != nil {
sgid := rs.Primary.Attributes["source_security_group_id"]
if sgid == "" {
return fmt.Errorf("Expected to find source_security_group_id for ELB, but was empty")
}
}
return nil return nil
} }
} }