Skip to content

Commit

Permalink
Set ForceNew on composite ID components
Browse files Browse the repository at this point in the history
  • Loading branch information
pietern committed Apr 22, 2021
1 parent 7d28df3 commit 9c50659
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sqlanalytics/resource_visualization.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@ func ResourceVisualization() *schema.Resource {
}
return bytes.Equal(oldp, newp)
}

// Changing part of the composite ID forces recreate.
m["query_id"].ForceNew = true
m["visualization_id"].ForceNew = true

return m
})

Expand Down
4 changes: 4 additions & 0 deletions sqlanalytics/resource_widget.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,10 @@ func ResourceWidget() *schema.Resource {
return extractVisualizationID(old) == extractVisualizationID(new)
}

// Changing part of the composite ID forces recreate.
m["dashboard_id"].ForceNew = true
m["widget_id"].ForceNew = true

return m
})

Expand Down

0 comments on commit 9c50659

Please sign in to comment.