diff --git a/builtin/providers/aws/resource_aws_subnet.go b/builtin/providers/aws/resource_aws_subnet.go index 2c66419e6..5ef2b763a 100644 --- a/builtin/providers/aws/resource_aws_subnet.go +++ b/builtin/providers/aws/resource_aws_subnet.go @@ -123,6 +123,12 @@ func resource_aws_subnet_update_state( s.Attributes["availability_zone"] = subnet.AvailabilityZone s.Attributes["cidr_block"] = subnet.CidrBlock s.Attributes["vpc_id"] = subnet.VpcId + + // We belong to a VPC + s.Dependencies = []terraform.ResourceDependency{ + terraform.ResourceDependency{ID: subnet.VpcId}, + } + return s, nil }