providers/aws: db instances now depend on db security groups

This commit is contained in:
Jack Pearkes 2014-07-31 09:28:25 -04:00
parent 9c02e41e73
commit 9a2685cf13
1 changed files with 7 additions and 0 deletions

View File

@ -265,6 +265,13 @@ func resource_aws_db_instance_update_state(
s.Attributes[k] = v
}
// We depend on any security groups attached
for _, g := range v.DBSecurityGroupNames {
s.Dependencies = []terraform.ResourceDependency{
terraform.ResourceDependency{ID: g},
}
}
return s, nil
}