feat: migrate starterkit tenants to meshstack_tenant (anticipates provider v0.24.0)#226
feat: migrate starterkit tenants to meshstack_tenant (anticipates provider v0.24.0)#226grubmeshi wants to merge 3 commits into
Conversation
Scorecard Check
📊 meshstack-hub Module Scorecard
📋 Per-Module Category SummaryScore per category per building block.
Core Structure — ✅ all passingBasic module file structure and documentation — applies to 2 modules
Core Structure — Summary
Integration — some checks failingmeshstack_integration.tf conventions — applies to 2 modules
Integration — Summary
Azure Backplane — not applicableAzure UAMI-based automation principal conventions — applies to 0 modules No applicable modules. STACKIT Backplane — not applicableSTACKIT WIF-based automation principal conventions — applies to 0 modules No applicable modules. Testing — some checks failingEnd-to-end test coverage — applies to 2 modules
Testing — Summary
📈 Overall SummaryOverall Average Score: 87%Score Distribution
|
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
…r v0.24.0 Anticipates terraform-provider-meshstack #226 (v0.24.0), which reworks meshstack_tenant onto the meshTenant v4 API and deprecates meshstack_tenant_v4. The aks, ske and azure-virtual-machine starterkits move their meshstack_tenant_v4 usages to meshstack_tenant via `moved` blocks (both share the v4 body, so the move upgrades state in place). The v4 body references platform and landing zone by ref: - spec.platform_ref (by uuid): wired into each buildingblock as a new static BBD input `platform_ref`, sourced from the platform/backplane that owns the meshPlatform (its `.ref`). - spec.landing_zone_ref (by name): built in place from the existing landing zone identifier(s). The redundant `full_platform_identifier` input is dropped: where it was only used for meshPanel deep-links, a `meshstack_platform` data source (keyed by platform_ref.uuid) now supplies the computed `.identifier`. Provider version floor bumped to >= 0.24.0. DRAFT: hub CI (`tf validate`) stays red until v0.24.0 is published, since the ref-based meshstack_tenant body only exists there. Docs generated with the nix-pinned terraform-docs v0.20.0. BREAKING CHANGE: the aks/ske/azure-vm starterkit building blocks replace the `full_platform_identifier` input with a `platform_ref` object input. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
89178e6 to
9f252c8
Compare
| platform_identifier = var.full_platform_identifier | ||
| landing_zone_identifier = var.landing_zone_dev_identifier | ||
| platform_ref = var.platform_ref | ||
| landing_zone_ref = { name = var.landing_zone_dev_identifier } |
There was a problem hiding this comment.
f: that could be aligned more, as the lz resource has some "ref" output now (in anticipated version), so we can write (after wired through via static input from BBD), similar as platform ref:
| landing_zone_ref = { name = var.landing_zone_dev_identifier } | |
| landing_zone_ref = var.landing_zone_ref |
There was a problem hiding this comment.
f: move this closer to tenant refs, merge dev/prod identifiers to landing_zone_refs (see ske starterkit)
| # jsonencode twice is correct for structured inputs, see landing_zone_identifiers below. | ||
| argument = jsonencode(jsonencode(var.platform_ref)) | ||
| } | ||
| "landing_zone_identifiers" = { |
There was a problem hiding this comment.
f: align (see other comments)
| "landing_zone_identifiers" = { | |
| "landing_zone_refs" = { |
There was a problem hiding this comment.
| variable "landing_zone_refs" { | |
| type = map(object({ name = string, kind = optional(string, "meshLandingZone")}) | |
| }) | |
| description = "map keys are the stages, usually dev and prod" | |
| } |
…ovider v0.24.0 Move meshstack_tenant_v4 (dev, prod) to meshstack_tenant via `moved` blocks (both share the v4 body, so state upgrades in place), anticipating terraform-provider-meshstack #226 (v0.24.0). The v4 body references platform and landing zone by ref, wired in as static BBD inputs: - platform_ref (by uuid): new object input, sourced from the platform/backplane `.ref` - landing_zone_refs (by name): new map input keyed by stage (dev/prod), replacing the landing_zone_dev/prod_identifier string inputs full_platform_identifier is dropped; meshPanel deep-links resolve the platform's `.identifier` via a meshstack_platform data source keyed by platform_ref.uuid. Provider floor -> >= 0.24.0. BREAKING CHANGE: the aks starterkit building block replaces full_platform_identifier and landing_zone_dev/prod_identifier with platform_ref and landing_zone_refs inputs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…f provider v0.24.0 Move meshstack_tenant_v4 (for_each over landing zones) to meshstack_tenant via a `moved` block, anticipating terraform-provider-meshstack #226 (v0.24.0). Same ref-based wiring as the aks starterkit: platform_ref (by uuid) + landing_zone_refs (map of {name, kind} keyed by stage) as static BBD inputs, replacing full_platform_identifier / landing_zone_identifiers. The e2e platform test module gains platform_ref and landing_zone_refs outputs. Provider floor -> >= 0.24.0. BREAKING CHANGE: the ske starterkit building block replaces full_platform_identifier and landing_zone_identifiers with platform_ref and landing_zone_refs inputs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
9f252c8 to
b8bcb2e
Compare
Replace the spelled-out dev/prod projects, project user bindings, tenants and GitHub Actions
connectors with single for_each resources keyed off var.landing_zone_refs (no local stage map),
matching the ske starterkit. Per-stage values are indexed by the stage key and fail if absent
(no lookup defaults): project_tags[each.key] and a small github_environment_names map
(dev->development, prod->production); the app domain is derived inline (prod has no suffix).
project_tags aligns to ske's shape - adds optional owner_tag_key with the owner-tag merge and
drops the {} default. Purely a Terraform address-management change (no behavioural change).
`moved` blocks are chained so nothing is recreated: hop 1 is the resource-type migration
(meshstack_tenant_v4 -> meshstack_tenant; meshstack_building_block_v2 -> meshstack_building_block),
hop 2 is the dev/prod -> for_each address change. Terraform follows the chain.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
5139f01 to
d3c0b33
Compare
Depends on: terraform-provider-meshstack v0.24.0 release
This migration targets the ref-based
meshstack_tenantthat ships in provider v0.24.0, so thetouched modules bump their
meshstackfloor to>= 0.24.0(buildingblockversions.tfand themeshstack_integration.tfrequired_providers).Do not merge until v0.24.0 is published to the registry. The modules pin
>= 0.24.0, soconsumers (IaC runtimes) can't
terraform init/plan against them until the release is out — theref-based
meshstack_tenantbody and themovedchains only resolve on v0.24.0. Note: hub CI hereis green because module validation is structural (README/fmt/layout via
ci/validate_modules.sh),not a provider-resolving
init/validate, so a green build does not imply the provider is availableyet. Provider PR stack:
meshstack_tenantwith the meshTenant v4 API +moved-block migration frommeshstack_tenant_v4(the change this PR consumes)Backend context (meshfed-release): the v4 tenant API landed via #10308 (merged); GA promotion is #10309.
What
Migrates the
meshstack_tenant_v4usages in the aks and ske starterkits to the reworkedmeshstack_tenant, plus an aks address-management refactor:feat(aks/starterkit)— migratedev+prodtenants tomeshstack_tenantfeat(ske/ske-starterkit)— migratethis(for_each over landing zones) + e2e wiringrefactor(aks/starterkit)— drive the per-stage aks resources (projects, bindings, tenants,GHA connectors) with
for_eachkeyed by stage instead of spelled-outdev/prod, matching theske shape
Each tenant move is a non-destructive
moved { from = meshstack_tenant_v4.X, to = meshstack_tenant.X }(both share the v4 body, so state upgrades in place — no tenant recreate). The aks
for_eachrefactoradds
movedblocks that map the deployed addresses directly to the new for_each keys in a singlehop (folding in the in-flight
meshstack_tenant_v4→meshstack_tenantandmeshstack_building_block_v2→meshstack_building_blocktype migrations), so the address change alonenever recreates a resource.
Ref-based body → aligned inputs
v0.24.0 references platform and landing zone by ref, so both starterkits now take the same two
tenant-ref inputs, wired identically as static BBD inputs (positioned together):
platform_ref—object({ uuid, kind }), by uuid. Sourced from the platform/backplane thatowns the
meshstack_platform(its.ref).landing_zone_refs—map(object({ name, kind }))keyed by stage (dev/prod), by name.This replaces the previous
full_platform_identifier+ per-stage landing-zone identifier inputs(addresses the review feedback to align ske/aks and treat landing zones like
platform_ref).full_platform_identifieris dropped entirely: where it fed meshPanel deep-links, ameshstack_platformdata source keyed byplatform_ref.uuidsupplies the computed.identifier.Breaking change for consumers
Both starterkits replace
full_platform_identifier+ landing-zone identifier inputs withplatform_ref+landing_zone_refs. Integrations/consumers must supply the refs (e.g.meshstack_platform.<x>.ref,meshstack_landingzone.<x>.ref).Notes
so the integration wires them directly — this PR takes them as static BBD inputs, the minimal
shape of that pattern.
🤖 Generated with Claude Code