providers/aws: setup subnet dependenyc on VPC

This commit is contained in:
Mitchell Hashimoto 2014-07-07 15:09:49 -07:00
parent 0319e89281
commit 65d959003f
1 changed files with 6 additions and 0 deletions

View File

@ -123,6 +123,12 @@ func resource_aws_subnet_update_state(
s.Attributes["availability_zone"] = subnet.AvailabilityZone s.Attributes["availability_zone"] = subnet.AvailabilityZone
s.Attributes["cidr_block"] = subnet.CidrBlock s.Attributes["cidr_block"] = subnet.CidrBlock
s.Attributes["vpc_id"] = subnet.VpcId s.Attributes["vpc_id"] = subnet.VpcId
// We belong to a VPC
s.Dependencies = []terraform.ResourceDependency{
terraform.ResourceDependency{ID: subnet.VpcId},
}
return s, nil return s, nil
} }