From 0b3d249727056ea8456e2b5f7b8385f8134a7c2e Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 30 Jun 2015 10:24:53 -0700 Subject: [PATCH] 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 --- builtin/providers/aws/resource_aws_instance_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/builtin/providers/aws/resource_aws_instance_test.go b/builtin/providers/aws/resource_aws_instance_test.go index d1bdd00ed..c189a5963 100644 --- a/builtin/providers/aws/resource_aws_instance_test.go +++ b/builtin/providers/aws/resource_aws_instance_test.go @@ -579,6 +579,11 @@ func testAccCheckInstanceExistsWithProviders(n string, i *ec2.Instance, provider return fmt.Errorf("No ID is set") } 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 resp, err := conn.DescribeInstances(&ec2.DescribeInstancesInput{ InstanceIDs: []*string{aws.String(rs.Primary.ID)},