Skip to content

Commit

Permalink
fix: issue a warning instead of recreating the resource on tag removal
Browse files Browse the repository at this point in the history
  • Loading branch information
thatsddr committed Mar 30, 2022
1 parent 9f278ca commit 65b3fb0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion awsmt/resource_playback_configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,14 @@ func resourcePlaybackConfigurationUpdate(ctx context.Context, d *schema.Resource
oldValue, newValue := d.GetChange("tags")
for k := range oldValue.(map[string]interface{}) {
if _, ok := (newValue.(map[string]interface{}))[k]; !ok {
deletePlaybackConfiguration(client, d.Get("name").(string))
diags = append(diags, diag.Diagnostic{
Severity: diag.Warning,
Summary: "Tag removal detected, but not supported.",
Detail: "This provider does not support tag removal. For more information about the issue, visit this link: https://github.com/aws/aws-sdk-go/issues/4337\nThe tag(s) will only be removed from the terraform state.",
})
}
}

}

input := getPlaybackConfigurationInput(d)
Expand Down

0 comments on commit 65b3fb0

Please sign in to comment.