helper/resource: destroy on requiresNew
This commit is contained in:
parent
5384f63b3d
commit
b6a02e473d
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue