helper/resource: destroy on requiresNew

This commit is contained in:
Mitchell Hashimoto 2014-06-25 18:41:40 -07:00
parent 5384f63b3d
commit b6a02e473d
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ func (m *Map) Apply(
return nil, fmt.Errorf("Unknown resource type: %s", s.Type)
}
if d.Destroy {
if d.Destroy || d.RequiresNew() {
if s.ID != "" {
// Destroy the resource if it is created
err := r.Destroy(s, meta)