Skip to content

Commit

Permalink
Merge pull request #29550 from hashicorp/b-SetTagsAll-DeletePlan
Browse files Browse the repository at this point in the history
Don't do anything for Framework `tags_all` plan modification on Delete
  • Loading branch information
ewbankkit authored Feb 21, 2023
2 parents 9e923b7 + fd30e8b commit 928306b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/29550.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
resource/aws_resourceexplorer2_view: Fix `Unexpected Planned Resource State on Destroy` errors when using Terraform CLI v1.3 and above
```
5 changes: 5 additions & 0 deletions internal/framework/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ func (r *ResourceWithConfigure) FlattenTagsAll(ctx context.Context, apiTags tfta

// SetTagsAll calculates the new value for the `tags_all` attribute.
func (r *ResourceWithConfigure) SetTagsAll(ctx context.Context, request resource.ModifyPlanRequest, response *resource.ModifyPlanResponse) {
// If the entire plan is null, the resource is planned for destruction.
if request.Plan.Raw.IsNull() {
return
}

defaultTagsConfig := r.Meta().DefaultTagsConfig
ignoreTagsConfig := r.Meta().IgnoreTagsConfig

Expand Down

0 comments on commit 928306b

Please sign in to comment.