Skip to content

Add pulumi kit - #182

Open
dirien wants to merge 1 commit into
docker:mainfrom
dirien:add-infrastructure-kit
Open

Add pulumi kit#182
dirien wants to merge 1 commit into
docker:mainfrom
dirien:add-infrastructure-kit

Conversation

@dirien

@dirien dirien commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

A kind: mixin kit that installs the Pulumi CLI and wires the Pulumi Cloud access token through the sandbox proxy, so pulumi login, pulumi up and pulumi 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 infrastructure kit (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 on main as 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), no curl | sh. Same pattern as the trivy and glab kits. Idempotent (skips when the pinned version is already present).
  • credentials — service pulumi, proxyManaged API key injected as Authorization: token <PAT> on api.pulumi.com only; 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).
  • environmentPULUMI_SKIP_UPDATE_CHECK=true.
  • files/home/runbooks/pulumi-random-ts — a credential-free starter (random provider) to smoke-test the toolchain.
  • agentInstructions — short workflow guidance (preview before up, non-interactive flags, where credentials come from).

Spec choices worth flagging:

  • The install runs as root and links every pulumi* binary from /opt/pulumi into /usr/local/bin: the CLI finds its language hosts (pulumi-language-*) by PATH lookup of its siblings.
  • Bumping is a three-line edit: PULUMI_VERSION plus both checksums from https://get.pulumi.com/releases/sdk/pulumi-<version>-checksums.txt.
  • Cloud credentials are deliberately out of scope; ESC (pulumi env) is the documented way to hand them to a program.

Test plan

  • ./scripts/test-kit.sh pulumi — TCK PASS, including container/install_execution (real install in a container, 19.6s) and the files/ assertions.
  • The install command run by hand on linux/arm64 under sh (dash) as root with pulumi removed from PATH: checksum OK, 13 binaries linked, pulumi versionv3.260.0. shellcheck -s sh clean.
  • sbx kit validate ./pulumi → VALID; ./scripts/test-kit-e2e.sh pulumi → PASS on the host (macOS arm64, sbx v0.39.0) under deny-all: real sbx create, install 23.2s, no blocked requests, env/files/tmpfs/agentContext assertions green (63.6s total).

@dirien
dirien requested a review from a team as a code owner August 11, 2026 09:22
@dirien

dirien commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

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.

@mdelapenya

Copy link
Copy Markdown
Member

@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>
@dirien
dirien force-pushed the add-infrastructure-kit branch from 950ff7a to 9c496c1 Compare August 30, 2026 12:31
@dirien dirien changed the title Add infrastructure kit Add pulumi kit Aug 30, 2026
@dirien

dirien commented Aug 30, 2026

Copy link
Copy Markdown
Contributor Author

Agreed, composing at runtime is the better shape, so this PR is now a pulumi kit only. It installs the CLI from the 3.260.0 GitHub release with the amd64 and arm64 SHA256s pinned in the spec, the same way trivy and glab do it, with no script fetched from anywhere else. The PULUMI_ACCESS_TOKEN credential is proxy-managed and injected on api.pulumi.com. The allow-list covers the Pulumi Cloud API, plugin downloads, npm, PyPI and the Go module proxy, plus the hosted Pulumi MCP. A credential-free random-provider runbook lands in ~/runbooks. The branch is rebased on main as one commit, and ./scripts/test-kit.sh pulumi passes here, including the install_execution subtest that runs the install in a container.

Next I'll open aws-cli, opentofu, gcloud and azure-cli as separate mixins. aws-cli is the companion kit you asked for on #98, so I'll link it from that thread. Terraform stays with #98 and kubectl/Helm with #137; no point duplicating either.

The Kit TCK workflow still needs a maintainer to approve the run. If you want the spec trimmed further, say where.

Comment thread pulumi/README.md
Then create a sandbox with the kit:

```console
sbx run --kit "git+https://github.com/docker/sbx-kits-contrib.git#dir=pulumi" claude

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

suggestion: prefer the OCI artifact instead

Suggested change
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

Comment thread pulumi/README.md
`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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

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.

2 participants