Skip to content

feat: deprecate meshstack_tenant in favor of meshstack_tenant_v4#217

Open
grubmeshi wants to merge 1 commit into
mainfrom
feature/deprecate-tenant-resource
Open

feat: deprecate meshstack_tenant in favor of meshstack_tenant_v4#217
grubmeshi wants to merge 1 commit into
mainfrom
feature/deprecate-tenant-resource

Conversation

@grubmeshi

@grubmeshi grubmeshi commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

What

Deprecate the legacy meshstack_tenant resource in favor of meshstack_tenant_v4.

Why

Only meshstack_tenant_v4 exposes the tenant uuid (and a ref), which meshstack_building_block
requires to target a tenant (target_ref for a meshTenant needs a uuid). meshstack_tenant
cannot be used to wire up building blocks, so it should no longer be the default choice.

Changes

  • Add a DeprecationMessage to the meshstack_tenant resource schema pointing at
    meshstack_tenant_v4. Terraform/OpenTofu now emit a deprecation warning when the resource is used.
  • CHANGELOG: new v0.23.1 section with a DEPRECATIONS entry.

Migration note

There is no automatic state migration between the two resource types (no state mover / moved
support), so the message tells users to move existing tenants over by importing them into
meshstack_tenant_v4 rather than promising a moved block.

Validation

  • go build ./..., task lint (0 issues), task test tenant suite (mock) all green.
  • task generate is a no-op for docs — the repo's doc template doesn't render resource-level
    DeprecationMessage (same as the already-deprecated meshstack_buildingblock).

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

📊 Test Coverage

Scope Coverage
Unit tests (mock client) 74.8%
Combined (unit + acceptance) 80.4% — ✅ acceptance passed
Uncovered functions (combined run)
github.com/meshcloud/terraform-provider-meshstack/client/api_key_permissions.go:225:							AllApiKeyPermissions				0.0%
github.com/meshcloud/terraform-provider-meshstack/client/buildingblock.go:97:								Delete						0.0%
github.com/meshcloud/terraform-provider-meshstack/client/client.go:48:									NewApiTokenAuthorization			0.0%
github.com/meshcloud/terraform-provider-meshstack/client/internal/logging.go:27:							Debug						0.0%
github.com/meshcloud/terraform-provider-meshstack/client/internal/logging.go:31:							Info						0.0%
github.com/meshcloud/terraform-provider-meshstack/client/internal/logging.go:35:							Warn						0.0%
github.com/meshcloud/terraform-provider-meshstack/client/internal/retry.go:225:								Close						0.0%
github.com/meshcloud/terraform-provider-meshstack/client/internal/retry.go:246:								Write						0.0%
github.com/meshcloud/terraform-provider-meshstack/client/project_group_binding.go:27:							Read						0.0%
github.com/meshcloud/terraform-provider-meshstack/client/project_group_binding.go:31:							Create						0.0%

Combined with go tool covdata merge over the unit and acceptance coverage data. The acceptance suite runs ./internal/provider against the live backend; coverage is attributed across all packages (-coverpkg=./...).

The meshstack_tenant resource does not expose the tenant uuid, which
meshstack_building_block requires to target a tenant. Only meshstack_tenant_v4
exposes uuid/ref, so add a DeprecationMessage steering users to it. There is no
automatic state migration between the two resource types (no state mover), so the
message points users to importing into meshstack_tenant_v4.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@grubmeshi grubmeshi force-pushed the feature/deprecate-tenant-resource branch from 8ac711f to 1e9539e Compare July 2, 2026 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant