Skip to content

feat: add tag, JSON-schema, and conditional inputs to NoOp BB - #307

Merged
Jelledb merged 10 commits into
mainfrom
feature/add-new-features-to-noop
Sep 21, 2026
Merged

Jelledb merged 10 commits into
mainfrom
feature/add-new-features-to-noop

Conversation

@Jelledb

@Jelledb Jelledb commented Sep 4, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Extends the meshstack/noop reference building block to demonstrate three meshcloud/meshstack
provider features that are now available: tag inputs, JSON-schema-driven inputs, and conditional
inputs. Bumps the provider constraint to >= 0.25.3 (required for json_schema/condition).

  • Tags: tag_value (TAG assignment) now also has a working NONE output — removed the stale
    "waiting for TF provider release" comment now that it's supported.
  • JSON-schema inputs: new deploy_settings input (type = "JSON" + json_schema) — meshPanel
    renders a form from the schema, and the result reaches Terraform as JSON text, like a CODE input.
  • Conditional inputs: new conditional_text (condition = "input.flag == true", shown and
    filled in the e2e tests) and hidden_conditional_text (condition = "input.flag == false", never
    shown in this reference deployment) — together they exercise both sides of the condition
    attribute: a condition that holds, and one that doesn't, where the input is safely omitted and the
    Terraform variable's own default takes over, exactly like optional_text.

Each feature is documented in buildingblock/README.md with a "How it works" section and code
snippet, following the existing pattern used for optional inputs.

Testing

Added/extended e2e coverage in e2e/main.tf, e2e/runner/main.tf and their .tftest.hcl files for
all new inputs/outputs, including the skip case for hidden_conditional_text. Verified against the
meshcloud/meshstack-smoke-test dev environment; along the way, fixed a pre-existing flaky assertion
pattern (== between a jsondecode()'d output and an HCL object/list literal, which can spuriously
fail on OpenTofu's tuple/object type unification) by comparing canonical jsonencode() strings
instead, for both tag_value and the new deploy_settings output.

Test plan

  • tofu validate passes for buildingblock/ and the integration root (provider >= 0.25.3)
  • terraform-docs / terraform fmt / trailing-whitespace pre-commit hooks pass
  • Scorecard for meshstack/noop remains 100%
  • Smoke-tested against meshcloud/meshstack-smoke-test dev instance — conditional_text and
    hidden_conditional_text assertions pass

@github-actions

github-actions Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

Scorecard Check

Scorecard run on commit 7585bf51d18b37aa26dd2b20db0f54de427ee4ff relative to origin/main

📊 meshstack-hub Module Scorecard

Generated: 2026-09-21 | Modules scanned: 1 | Categories: 7

📋 Per-Module Category Summary

Score per category per building block. n/a = category does not apply to this module.

Module Overall Core Structure Integration AWS Backplane Azure Backplane GCP Backplane STACKIT Backplane Testing
meshstack/noop 🟢 100% 🟢 100% 🟢 100% n/a n/a n/a n/a 🟢 100%

✅ All checks passing! This module meets all scorecard criteria.

Core Structure — ✅ all passing

Basic module file structure and documentation — applies to 1 modules

Module Score 📦 🔗 📋 📝 🖼️ 📌 🚦 🎯 🩹 🔒
meshstack/noop 🟢 100% ✅ ✅ ➖ ✅ ✅ ✅ ➖ ✅ ✅ ✅

Core Structure — Summary

Emoji Criterion Coverage Status
📦 buildingblock/ directory exists 1/1 🟢 100%
🔗 meshstack_integration.tf present 1/1 🟢 100%
📋 buildingblock/APP_TEAM_README.md present (no-integration fallback) n/a —
📝 buildingblock/README.md with YAML front-matter 1/1 🟢 100%
🖼️ buildingblock/logo.png included 1/1 🟢 100%
📌 buildingblock/versions.tf present 1/1 🟢 100%
🚦 Child meshstack_building_block asserts a SUCCEEDED run n/a —
🎯 meshStack *_ref attributes use the resource's ref output 1/1 🟢 100%
🩹 Every try() carries a comment saying why 1/1 🟢 100%
🔒 Provider versions float within one major (>= X.Y.Z, < N.0.0) 1/1 🟢 100%
Integration — ✅ all passing

meshstack_integration.tf conventions — applies to 1 modules

Module Score 🏷️ 🏢 📤 🔌 📎 🔀 🌱 📋 🏷️ 🧱 🏪 📖 📝 📊 🚫 🔄
meshstack/noop 🟢 100% ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ➖

Integration — Summary

Emoji Criterion Coverage Status
🏷️ variable "hub" in integration 1/1 🟢 100%
🏢 variable "meshstack" in integration 1/1 🟢 100%
📤 building_block_definition output exposed 1/1 🟢 100%
🔌 meshcloud/meshstack in required_providers 1/1 🟢 100%
📎 backplane source uses var.hub.git_ref 1/1 🟢 100%
🔀 ref_name uses var.hub.git_ref 1/1 🟢 100%
🌱 BBD terraform_version >= 1.12.0 1/1 🟢 100%
📋 version_spec.draft uses var.hub.bbd_draft 1/1 🟢 100%
🏷️ BBD metadata.tags forwards var.meshstack.tags 1/1 🟢 100%
🧱 BBD input argument vars with optional() have explicit defaults 1/1 🟢 100%
🏪 BBD catalog properties are overridable 1/1 🟢 100%
📖 BBD readme field present 1/1 🟢 100%
📝 BBD readme starts with plain-text description (no heading) 1/1 🟢 100%
📊 BBD readme has shared responsibility table (✅/❌) 1/1 🟢 100%
🚫 No documentation_md output in backplane 1/1 🟢 100%
🔄 meshstack_platform has lifecycle ignore_changes = [availability] n/a —
AWS Backplane — not applicable

AWS automation principal conventions (WIF or cross-account StackSet) — applies to 0 modules

No applicable modules.

Azure Backplane — not applicable

Azure UAMI-based automation principal conventions — applies to 0 modules

No applicable modules.

GCP Backplane — not applicable

GCP workload-identity-federation automation principal conventions — applies to 0 modules

No applicable modules.

STACKIT Backplane — not applicable

STACKIT WIF-based automation principal conventions — applies to 0 modules

No applicable modules.

Testing — ✅ all passing

End-to-end test coverage — applies to 1 modules

Module Score ⚙️ 🧪 🚫 ✅
meshstack/noop 🟢 100% ✅ ✅ ✅ ✅

Testing — Summary

Emoji Criterion Coverage Status
⚙️ backplane/ directory (optional tier) 1/1 🟢 100%
🧪 e2e/ test directory exists 1/1 🟢 100%
🚫 no .tftest.hcl outside e2e/ 1/1 🟢 100%
✅ e2e/ contains .tftest.hcl files 1/1 🟢 100%

@aws-amplify-eu-central-1

Copy link
Copy Markdown

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-307.d1o16zfeoh2slu.amplifyapp.com

@Jelledb Jelledb changed the title feat: add tags & JSON schema to NoOp BB feat: add tag, JSON-schema, and conditional inputs to NoOp BB Sep 10, 2026
@Jelledb
Jelledb force-pushed the feature/add-new-features-to-noop branch from 91f4dcb to af261bd Compare September 10, 2026 11:57
@Jelledb
Jelledb marked this pull request as ready for review September 10, 2026 11:58
@Jelledb
Jelledb force-pushed the feature/add-new-features-to-noop branch from 738d1b2 to bc6c2de Compare September 11, 2026 09:58
@Jelledb

Jelledb commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator Author

@Jelledb
Jelledb requested review from j0g3sc and a balanced review from Copilot September 15, 2026 11:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Untagged runs can fail, and the e2e fixtures introduce unsafe shared-workspace tag mutations.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 3 High severity · 1 Medium severity · 1 Low severity

Open (5)
What changed in this PR

Extends the NoOp reference building block with tag, JSON-schema, and conditional inputs plus end-to-end coverage.

Changes:

  • Adds new input/output definitions and provider requirement.
  • Extends standard and custom-runner e2e fixtures.
  • Updates reference documentation and expected outputs.
File Description
modules/​meshstack/​noop/​meshstack_integration.tf Defines new inputs/outputs and provider floor.
modules/​meshstack/​noop/​buildingblock/​variables.tf Declares corresponding Terraform variables.
modules/​meshstack/​noop/​buildingblock/​outputs.tf Exposes and debugs new values.
modules/​meshstack/​noop/​buildingblock/​README.md Documents new input types.
modules/​meshstack/​noop/​e2e/​main.tf Adds tag fixtures and input values.
modules/​meshstack/​noop/​e2e/​runner/​main.tf Extends custom-runner coverage.
modules/​meshstack/​noop/​e2e/​tests/​building_block_noop_hub.tftest.hcl Asserts new standard-runner outputs.
modules/​meshstack/​noop/​e2e/​tests/​building_block_noop_runner_hub.tftest.hcl Asserts conditional and JSON outputs.
modules/​meshstack/​noop/​e2e/​tests/​building_block_noop_hub.debug_input_variables_json.expected.json Updates expected debug payload.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread modules/meshstack/noop/buildingblock/variables.tf
Comment thread modules/meshstack/noop/e2e/main.tf
Comment thread modules/meshstack/noop/e2e/runner/main.tf
Comment thread modules/meshstack/noop/buildingblock/README.md
Jelledb and others added 10 commits September 21, 2026 15:10
* This is WIP because we need a meshStack release first
Demonstrates the meshcloud/meshstack provider's new json_schema (type = JSON)
and condition attributes (v0.25.3, requires meshStack 2026.37.0+), and cleans
up the tag_value output now that TAG output assignment works.
Adds hidden_conditional_text alongside conditional_text so the e2e tests
exercise both sides of the condition attribute: a condition that holds
(value sent) and one that never holds (input hidden, safely skipped,
Terraform variable default flows through).
A raw == between a jsondecode()'d building block output and an HCL
object/list literal can spuriously fail on OpenTofu's tuple/object type
unification even when the values are identical (observed on real smoke-test
runs). Compare canonical jsonencode() strings on both sides instead.
CI's pre-commit run had fixed the alignment/ordering locally but the
changes were never committed, failing the lint job.
meshStack decodes a JSON-type input into the Terraform variable's declared
type, same as a CODE input (see tag_value, static_code) — not as a raw JSON
string. Retype deploy_settings accordingly and drop the now-unneeded
jsondecode()/double jsonencode() around it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The meshStack API rejects a JSON input's value unless it's sent as JSON
text (a string) — confirmed by a smoke-test run: "the value of a JSON
input is JSON text, so send it as a string." That's independent of what
type the Terraform variable decodes it into, so the previous commit's
switch to a single jsonencode() was wrong; restore the double encode.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@Jelledb
Jelledb force-pushed the feature/add-new-features-to-noop branch from ff140a9 to cd22f21 Compare September 21, 2026 13:10
@Jelledb
Jelledb merged commit 2a47e2f into main Sep 21, 2026
4 checks passed
@Jelledb
Jelledb deleted the feature/add-new-features-to-noop branch September 21, 2026 13:15
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.

3 participants