Test source_security_group_id for ELBs
This commit is contained in:
parent
9390674a05
commit
c905bfef22
|
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue