provider/aws: ignore providers with Meta nil
We changed the way validation works for providers so that they aren't always configured if they have computed attributes. The result is that sometimes the Configure won't be called, hence Meta is nil
This commit is contained in:
parent
6209eed10e
commit
0b3d249727
|
@ -579,6 +579,11 @@ func testAccCheckInstanceExistsWithProviders(n string, i *ec2.Instance, provider
|
||||||
return fmt.Errorf("No ID is set")
|
return fmt.Errorf("No ID is set")
|
||||||
}
|
}
|
||||||
for _, provider := range *providers {
|
for _, provider := range *providers {
|
||||||
|
// Ignore if Meta is empty, this can happen for validation providers
|
||||||
|
if provider.Meta() == nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
conn := provider.Meta().(*AWSClient).ec2conn
|
conn := provider.Meta().(*AWSClient).ec2conn
|
||||||
resp, err := conn.DescribeInstances(&ec2.DescribeInstancesInput{
|
resp, err := conn.DescribeInstances(&ec2.DescribeInstancesInput{
|
||||||
InstanceIDs: []*string{aws.String(rs.Primary.ID)},
|
InstanceIDs: []*string{aws.String(rs.Primary.ID)},
|
||||||
|
|
Loading…
Reference in New Issue