From 8705f0f78f9567d76295175858b9c9f4effcfc90 Mon Sep 17 00:00:00 2001 From: Clint Shryock Date: Wed, 6 May 2015 16:54:43 -0500 Subject: [PATCH] provider/aws: fix issue with reading VPC id in AWS Security Group --- builtin/providers/aws/resource_aws_security_group.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/providers/aws/resource_aws_security_group.go b/builtin/providers/aws/resource_aws_security_group.go index c673cb1f7..cff8222e0 100644 --- a/builtin/providers/aws/resource_aws_security_group.go +++ b/builtin/providers/aws/resource_aws_security_group.go @@ -149,7 +149,7 @@ func resourceAwsSecurityGroupCreate(d *schema.ResourceData, meta interface{}) er securityGroupOpts := &ec2.CreateSecurityGroupInput{} - if v := d.Get("vpc_id"); v != nil { + if v, ok := d.GetOk("vpc_id"); ok { securityGroupOpts.VPCID = aws.String(v.(string)) }