refactor: migrate building blocks to meshstack_building_block#215
refactor: migrate building blocks to meshstack_building_block#215grubmeshi wants to merge 4 commits into
Conversation
Scorecard Check
📊 meshstack-hub Module Scorecard
📋 Per-Module Category SummaryScore per category per building block.
Core Structure — some checks failingBasic module file structure and documentation — applies to 12 modules
Core Structure — Summary
Integration — some checks failingmeshstack_integration.tf conventions — applies to 10 modules
Integration — Summary
Azure Backplane — some checks failingAzure UAMI-based automation principal conventions — applies to 4 modules
Azure Backplane — Summary
STACKIT Backplane — some checks failingSTACKIT WIF-based automation principal conventions — applies to 2 modules
STACKIT Backplane — Summary
Testing — some checks failingEnd-to-end test coverage — applies to 12 modules
Testing — Summary
📈 Overall SummaryOverall Average Score: 87%Score Distribution
|
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
a687810 to
2ab2787
Compare
Migrate the app-team-managed child building blocks in the aks, azure-vm and ske
starterkits from the deprecated meshstack_building_block_v2 to meshstack_building_block.
- Convert per-type inputs (value_string/value_int/value_bool/...) to the unified
value = jsonencode(...) shape; CODE inputs are double-encoded per the terraform
runner contract (jsonencode(jsonencode({...}))).
- Read status.outputs via jsondecode(...value).
- Add moved{} blocks so the live blocks migrate in place (no destroy/recreate).
- Bump the meshstack provider constraint to >= 0.23.0 and regenerate READMEs.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Switch every e2e smoke-test building block from meshstack_building_block_v2 to
meshstack_building_block, converting inputs to value = jsonencode(...) / sensitive
blocks and rewriting the .tftest.hcl assertions to read outputs via jsondecode(...value)
(CODE/JSON outputs decode twice). No moved{} blocks — e2e runs in ephemeral test state.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…put shape Update the e2e-test skill to use meshstack_building_block, the value = jsonencode(...) / sensitive input shape, and jsondecode(...value) output reads. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…shstack_building_block
BREAKING CHANGE: replace the deprecated meshstack_tenant + meshstack_buildingblock
resources with meshstack_tenant_v4 and meshstack_building_block. No moved{} blocks are
provided, so existing sandboxes are recreated on next apply — same breaking-upgrade
approach used for the other modules.
- meshstack_tenant -> meshstack_tenant_v4 (platform_identifier moves from metadata to spec;
tenant_v4 exposes the tenant uuid/ref that target_ref requires).
- meshstack_buildingblock -> meshstack_building_block: target_ref points at
meshstack_tenant_v4.sandbox.ref; inputs use value = jsonencode(...).
- Resolve the definition version uuid from the config's (definition_uuid, version number)
via the meshstack_building_block_definitions data source.
- Bump the meshstack provider constraint to >= 0.23.0; regenerate README.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
113d8b8 to
888f66c
Compare
What
Migrate the hub off the deprecated
meshstack_building_block_v2andmeshstack_buildingblockresources onto
meshstack_building_block.Why
meshstack_building_blockis the recommended resource: it updates inputs, display name and thedefinition version in place (PUT + trigger-run) instead of the
meshstack_building_block_v2destroy-and-recreate, and unifies inputs under a single
value = jsonencode(...).Changes
aks,azure-virtual-machine,ske): child blocks migratedwith
moved {}blocks so live blocks move in place — no destroy/recreate.moved {}(ephemeral test state).aws/agentic-coding-sandbox— see the breaking change below.>= 0.23.0on touched modules; READMEs regenerated;e2e-testskill updated to match.
aws/agentic-coding-sandboxThis module used
meshstack_buildingblock+meshstack_tenant, chosen becausemeshstack_tenanttargets a tenant by identifier string while
meshstack_building_blocktargets byuuid. It is nowupgraded to
meshstack_tenant_v4+meshstack_building_blockwith nomoved {}blocks —existing sandboxes are recreated on next apply (same breaking-upgrade approach used for the e2e
switches).
meshstack_tenant_v4exposes the tenantuuid/refthattarget_refrequires, and theBBD version uuid is resolved from the config's
(definition_uuid, version number)via themeshstack_building_block_definitionsdata source. Pairs with the provider deprecation ofmeshstack_tenant(terraform-provider-meshstack#217).Migration rules applied
value_<type> = X→value = jsonencode(X); sensitive →sensitive = { secret_value = X }.jsonencode(jsonencode({...}))) per the terraform-runner contract..value_<type>→jsondecode(...value)(CODE/JSON outputs decode twice).Validation
nix developto match CI's pinnedterraform-docs): Terraform docs / fmt / Validate modules / trailing-whitespace.
tofu testneeds a live meshStack + published provider, so it is left to CI / the smoke-test runner.🤖 Generated with Claude Code