mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
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
Block a user