Problem
When a user changes any input value on a meshstack_building_block_v2 resource, Terraform plans a full destroy + create cycle because:
- The
inputs map has a RequiresReplace plan modifier (building_block_common.go:56)
- The resource's
Update method unconditionally returns an error: "Building blocks can't be updated" (building_block_v2_resource.go:315)
This is because the meshBuildingBlock meshObject API (POST/DELETE only) does not support PUT/PATCH — there is no way to update inputs on an existing building block via the current API.
Impact
Destroying and recreating a building block on every input change:
- Loses the building block's run history and outputs
- Triggers an unnecessary delete run followed by a create run
- Can cause downtime for dependent infrastructure managed by the building block runner
- Breaks parent/child building block relationships that reference the old UUID
Proposed fix
This will be addressed by the new meshstack_building_block_v3 resource, which should support in-place input updates by triggering a new building block run rather than replacing the entire building block. This likely requires a corresponding API change in meshStack to support updating building block inputs (or a dedicated "retrigger run" mechanism).
Problem
When a user changes any input value on a
meshstack_building_block_v2resource, Terraform plans a full destroy + create cycle because:inputsmap has aRequiresReplaceplan modifier (building_block_common.go:56)Updatemethod unconditionally returns an error: "Building blocks can't be updated" (building_block_v2_resource.go:315)This is because the meshBuildingBlock meshObject API (
POST/DELETEonly) does not supportPUT/PATCH— there is no way to update inputs on an existing building block via the current API.Impact
Destroying and recreating a building block on every input change:
Proposed fix
This will be addressed by the new
meshstack_building_block_v3resource, which should support in-place input updates by triggering a new building block run rather than replacing the entire building block. This likely requires a corresponding API change in meshStack to support updating building block inputs (or a dedicated "retrigger run" mechanism).