Add pulumi kit - #182
Conversation
|
Local verification is complete: the e2e wrapper (TestE2EKit, 193s on the scoped daemon under deny-all, no blocked requests) and the manual smoke (pinned tool versions on PATH, proxy sentinel in PULUMI_ACCESS_TOKEN, APM skills present) both pass on my machine. All four test-plan boxes are ticked. Ready for a CI approval and review whenever someone gets a chance. |
|
@dirien thanks for this contribution, looks promising! What do you think about splitting each technology in smaller kits? We'd prefer composing them at runtime consuming only what's needed. |
A mixin that installs the Pulumi CLI from a pinned, SHA256-verified GitHub release (amd64 + arm64) and declares a proxy-managed Pulumi Cloud access token injected on api.pulumi.com, so pulumi login/up and pulumi env (ESC) work without the token entering the container. Ships a credential-free runbook under ~/runbooks and allows the SDK registries a Pulumi program needs. Pairs with any base agent. Narrowed from the earlier all-in-one infrastructure kit per review: cloud CLIs, Terraform and OpenTofu will follow as separate mixins so they compose at runtime. Signed-off-by: Engin Diri <engin.diri@ediri.de>
950ff7a to
9c496c1
Compare
|
Agreed, composing at runtime is the better shape, so this PR is now a Next I'll open The Kit TCK workflow still needs a maintainer to approve the run. If you want the spec trimmed further, say where. |
| Then create a sandbox with the kit: | ||
|
|
||
| ```console | ||
| sbx run --kit "git+https://github.com/docker/sbx-kits-contrib.git#dir=pulumi" claude |
There was a problem hiding this comment.
suggestion: prefer the OCI artifact instead
| sbx run --kit "git+https://github.com/docker/sbx-kits-contrib.git#dir=pulumi" claude | |
| sbx run --kit "docker.io/sbx/pulumi-kit:latest" claude |
| `mcp.ai.pulumi.com` is on the allow-list. To give Claude Code the hosted Pulumi MCP server (registry lookups, resource-schema and code validation, Pulumi Neo), run once inside the sandbox: | ||
|
|
||
| ```console | ||
| claude mcp add --transport http -s user pulumi https://mcp.ai.pulumi.com/mcp |
There was a problem hiding this comment.
question: is it possible to connect the MCP server externally, through the Docker's MCP gateway on Docker Desktop? If so, I'd recommend also mentioning it.
Summary
A
kind: mixinkit that installs the Pulumi CLI and wires the Pulumi Cloud access token through the sandbox proxy, sopulumi login,pulumi upandpulumi env(Pulumi ESC) work without the token ever entering the container. Pairs with any base agent.This PR was opened as an all-in-one
infrastructurekit (Pulumi + Terraform + OpenTofu + kubectl/Helm + AWS/Azure/gcloud CLIs + an APM setup). Per the review, it is now narrowed to Pulumi only; the branch is rebased onmainas a single commit. Cloud CLIs, OpenTofu and friends will follow as separate mixins so they compose at runtime (--kit pulumi --kit aws-cli ...). Terraform is left to #98, kubectl/Helm to #137.What the kit declares
setup.install— Pulumi CLI v3.260.0 from a pinned GitHub release, per-arch SHA256 verified (amd64 + arm64), nocurl | sh. Same pattern as thetrivyandglabkits. Idempotent (skips when the pinned version is already present).credentials— servicepulumi,proxyManagedAPI key injected asAuthorization: token <PAT>onapi.pulumi.comonly;required: false(local/self-managed backends work without it).permissions.network.allow— Pulumi Cloud API,get.pulumi.com(runtime plugin downloads), the GitHub release hosts, the hosted Pulumi MCP (mcp.ai.pulumi.com, optional), and the SDK registries a Pulumi program pulls from (npm, PyPI, Go proxy).environment—PULUMI_SKIP_UPDATE_CHECK=true.files/home/runbooks/pulumi-random-ts— a credential-free starter (randomprovider) to smoke-test the toolchain.agentInstructions— short workflow guidance (preview before up, non-interactive flags, where credentials come from).Spec choices worth flagging:
pulumi*binary from/opt/pulumiinto/usr/local/bin: the CLI finds its language hosts (pulumi-language-*) by PATH lookup of its siblings.PULUMI_VERSIONplus both checksums fromhttps://get.pulumi.com/releases/sdk/pulumi-<version>-checksums.txt.pulumi env) is the documented way to hand them to a program.Test plan
./scripts/test-kit.sh pulumi— TCK PASS, includingcontainer/install_execution(real install in a container, 19.6s) and thefiles/assertions.sh(dash) as root withpulumiremoved from PATH: checksum OK, 13 binaries linked,pulumi version→v3.260.0.shellcheck -s shclean.sbx kit validate ./pulumi→ VALID;./scripts/test-kit-e2e.sh pulumi→ PASS on the host (macOS arm64, sbx v0.39.0) underdeny-all: realsbx create, install 23.2s, no blocked requests, env/files/tmpfs/agentContext assertions green (63.6s total).