Skip to content

Commit 6ae7841

Browse files
pieternnfx
authored andcommitted
Set ForceNew on composite ID components
1 parent fd3969f commit 6ae7841

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

sqlanalytics/resource_visualization.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,11 @@ func ResourceVisualization() *schema.Resource {
143143
}
144144
return bytes.Equal(oldp, newp)
145145
}
146+
147+
// Changing part of the composite ID forces recreate.
148+
m["query_id"].ForceNew = true
149+
m["visualization_id"].ForceNew = true
150+
146151
return m
147152
})
148153

sqlanalytics/resource_widget.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,10 @@ func ResourceWidget() *schema.Resource {
261261
return extractVisualizationID(old) == extractVisualizationID(new)
262262
}
263263

264+
// Changing part of the composite ID forces recreate.
265+
m["dashboard_id"].ForceNew = true
266+
m["widget_id"].ForceNew = true
267+
264268
return m
265269
})
266270

0 commit comments

Comments
 (0)