Skip to content

fix: source STACKIT storage-bucket e2e credentials from environment#233

Merged
JohannesRudolph merged 2 commits into
mainfrom
fix/stackit-storage-bucket-e2e-env-creds
Jul 24, 2026
Merged

fix: source STACKIT storage-bucket e2e credentials from environment#233
JohannesRudolph merged 2 commits into
mainfrom
fix/stackit-storage-bucket-e2e-env-creds

Conversation

@JohannesRudolph

Copy link
Copy Markdown
Member

What

The stackit/storage-bucket e2e harness's platform-team provider hardcoded service_account_key = var.stackit_service_account_key. This drops the variable and the explicit argument so the STACKIT provider discovers credentials from the environment on its own:

  • Local development: STACKIT_SERVICE_ACCOUNT_KEY_PATH (~/.stackit/credentials.json), per the standardized convention in meshstack-smoke-test/setup-env.sh.
  • CI: WIF.

Passing an explicit (possibly null) service_account_key argument overrides that env-based discovery and confused the CI environment.

Why not a "WIF fix" to the building block

The building block (buildingblock/provider.tf) and backplane already authenticate the STACKIT API via WIF (use_oidc = true + federated identity providers). Only the e2e test harness used a service account key — as the platform-team credential to provision the ephemeral backplane. This change touches only that harness.

experiments = ["iam"] stays because the inherited backplane provisions IAM resources (stackit_authorization_project_role_assignment, stackit_service_account_federated_identity_provider).

Testing

Ran locally via task hub:e2e:run MODULE=stackit/storage-bucket (build-from-source mode). The provider authenticated purely from STACKIT_SERVICE_ACCOUNT_KEY_PATH, provisioned the backplane, ordered a real building block, and the test passed: 1 passed, 0 failed.

🤖 Generated with Claude Code

The storage-bucket e2e harness's platform-team provider hardcoded
service_account_key = var.stackit_service_account_key. Drop the variable
and the explicit argument so the STACKIT provider discovers credentials
from the environment instead: STACKIT_SERVICE_ACCOUNT_KEY_PATH for local
development and WIF in CI. Passing an explicit null argument otherwise
overrides that discovery and confuses the CI environment.

The building block and backplane already authenticate via WIF; this only
touches the test harness. experiments = ["iam"] stays because the
inherited backplane provisions IAM resources.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Scorecard Check

Scorecard run on commit a5fbf5740e22abf9a6e20abeb04515a574f6c020 relative to origin/main

📊 meshstack-hub Module Scorecard

Generated: 2026-07-24 | Modules scanned: 1 | Categories: 5

📋 Per-Module Category Summary

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

Module Overall Core Structure Integration Azure Backplane STACKIT Backplane Testing
stackit/storage-bucket 🟢 100% 🟢 100% 🟢 100% n/a 🟢 100% 🟢 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 📦 🔗 📋 📝 🖼️ 📌 🔒
stackit/storage-bucket 🟢 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%
🔒 Provider versions use minimum constraint (>=) 1/1 🟢 100%
Integration — ✅ all passing

meshstack_integration.tf conventions — applies to 1 modules

Module Score 🏷️ 🏢 📤 🔌 📎 🔀 📋 🏷️ 🧱 📖 📝 📊 🚫 🔄
stackit/storage-bucket 🟢 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%
📋 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 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
Azure Backplane — not applicable

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

No applicable modules.

STACKIT Backplane — ✅ all passing

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

Module Score 🔐 🚫 📤
stackit/storage-bucket 🟢 100%

STACKIT Backplane — Summary

Emoji Criterion Coverage Status
🔐 Uses stackit_service_account_federated_identity_provider 1/1 🟢 100%
🚫 No stackit_service_account_key resource 1/1 🟢 100%
📤 Outputs service_account_email (not key) 1/1 🟢 100%
Buildingblock provider uses use_oidc = true 1/1 🟢 100%
Testing — ✅ all passing

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

Module Score ⚙️ 🧪
stackit/storage-bucket 🟢 100%

Testing — Summary

Emoji Criterion Coverage Status
⚙️ backplane/ directory (optional tier) 1/1 🟢 100%
🧪 e2e/ test directory exists 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-233.d1o16zfeoh2slu.amplifyapp.com

@JohannesRudolph
JohannesRudolph merged commit 1780df4 into main Jul 24, 2026
2 of 3 checks passed
@JohannesRudolph
JohannesRudolph deleted the fix/stackit-storage-bucket-e2e-env-creds branch July 24, 2026 15:26
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