
pulumi-esc
Guidance for working with Pulumi ESC (Environments, Secrets, and Configuration). Use when users ask about managing secrets, configuration, environments, short-term credentials, configuring OIDC for AWS, Azure, GCP, integrating with secret stores (AWS Secrets Manager, Azure Key Vault, HashiCorp Vault, 1Password), or using ESC with Pulumi stacks.
- Installs
- 1.4K
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/pulumi/agent-skills --skill pulumi-esc- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads pulumi-esc automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Pulumi ESC (Environments, Secrets, and Configuration)
Pulumi ESC is a centralized service for managing environments, secrets, and configuration across cloud infrastructure and applications.
What is ESC?
ESC enables teams to:
- Centralize secrets and configuration in one secure location
- Compose environments by importing and layering configuration
- Generate dynamic credentials via OIDC for AWS, Azure, GCP
- Integrate external secret stores (AWS Secrets Manager, Azure Key Vault, Vault, 1Password)
- Version and audit all configuration changes
- Control access with fine-grained RBAC
Essential CLI Commands
# Create a new environment
pulumi env init <org>/<project-name>/<environment-name>
# Edit environment (opens in editor)
pulumi env edit <org>/<project-name>/<environment-name>
# Set values
pulumi env set <org>/<project-name>/<environment-name> <key> <value>
pulumi env set <org>/<project-name>/<environment-name> <key> <value> --secret
# View definition (secrets hidden)
pulumi env get <org>/<project-name>/<environment-name>
# Open and resolve (reveals secrets)
pulumi env open <org>/<project-name>/<environment-name>
# Run command with environment
pulumi env run <org>/<project-name>/<environment-name> -- <command>
# Link to Pulumi stack
pulumi config env add <project-name>/<environment-name>
Key Concepts
Command Distinctions
pulumi env get: Shows static definition, secrets appear as[secret]pulumi env open: Resolves and reveals all values including secrets and dynamic credentialspulumi env run: Executes commands with environment variables loadedpulumi config env add: Only takes the <project-name>/<environment-name> portion
Environment Structure
Environments are YAML documents with reserved top-level keys:
imports: Import and compose other environmentsvalues: Define configuration and secrets
Reserved sub-keys under values:
environmentVariables: Map values to shell environment variablespulumiConfig: Configure Pulumi stack settingsfiles: Generate files with environment data
Basic Example
imports:
- common/base-config
values:
environment: production
region: us-west-2
dbPassword:
fn::secret: super-secure-password
environmentVariables:
AWS_REGION: ${region}
DB_PASSWORD: ${dbPassword}
pulumiConfig:
aws:region: ${region}
app:dbPassword: ${dbPassword}
Reading Another Stack's Outputs
Use the fn::open::pulumi-stacks provider to consume another stack's outputs. The
stacks and network keys below are arbitrary names you choose. Once the function
resolves, it replaces stacks.network with the named stack's outputs — so the
output names (vpcId, subnetIds) do not appear in the static YAML; they come from
whatever the producer stack exports. Two things are easy to get wrong:
- The stack is named by a single project-qualified
stack: <project>/<stackName>field — not separateprojectName/stackNamefields. - Outputs resolve directly under the stack name — there is no
.outputs.level (use${stacks.network.vpcId}, not${stacks.network.outputs.vpcId}).
Example — replace the stack name and output names with your own:
values:
stacks:
fn::open::pulumi-stacks:
stacks:
network: # arbitrary local name for the referenced stack
stack: my-project/dev # producer stack to read outputs from
pulumiConfig:
# vpcId / subnetIds are whatever the producer stack exports; after the function
# resolves they are available directly under `stacks.network` (no `.outputs.`).
vpcId: ${stacks.network.vpcId}
subnetIds: ${stacks.network.subnetIds}
Full schema: https://www.pulumi.com/docs/esc/providers/pulumi-stacks/
Viewing an Environment in the Pulumi Cloud Console
The console URL for an environment is
https://app.pulumi.com/<org>/esc/<project>/<environment>. The route segment is
esc, not environments.
Working with the User
For Simple Questions
If the user asks basic questions like "How do I create an environment?" or "What's the difference between get and open?", answer directly using the information above.
For Detailed Documentation
When users need more information, use the web-fetch tool to get content from the official Pulumi ESC documentation:
- Complete YAML syntax and functions → https://www.pulumi.com/docs/esc/environments/syntax/
- Provider integrations (AWS, Azure, GCP, Vault, 1Password):
- AWS: https://www.pulumi.com/docs/esc/integrations/dynamic-login-credentials/aws-login/
- Azure: https://www.pulumi.com/docs/esc/integrations/dynamic-login-credentials/azure-login/
- GCP: https://www.pulumi.com/docs/esc/integrations/dynamic-login-credentials/gcp-login/
- Short-term credential (OIDC) providers: https://www.pulumi.com/docs/esc/integrations/dynamic-login-credentials/
- Dynamic secret providers: https://www.pulumi.com/docs/esc/integrations/dynamic-secrets/
- Pulumi stack outputs (
fn::open::pulumi-stacks): https://www.pulumi.com/docs/esc/providers/pulumi-stacks/ - All providers (index): https://www.pulumi.com/docs/esc/providers/
- Getting started guide → https://www.pulumi.com/docs/esc/get-started/
- CLI reference → https://www.pulumi.com/docs/esc/cli/commands/
- Prefer using the
pulumi envsubcommands overescCLI.
- Prefer using the
Use the web-fetch tool with specific prompts to extract relevant information from these docs.
For Complex Tasks
When helping users:
- Understand the goal: Are they setting up new environments, migrating from stack config, or debugging?
- Check existing setup: Use
pulumi envcommands to list environments or read definitions - Fetch relevant documentation: Use the web-fetch to get specific examples or syntax from the official docs
- Provide step-by-step guidance: Walk through the process with specific commands
- Validate: Help them test with
pulumi env getorpulumi previewa. Only usepulumi env openwhen the full resolved values are needed, but use cautiously as it reveals secrets.
Example: Helping with AWS OIDC Setup
User: "How do I set up AWS OIDC credentials in ESC?"
1. Use the web-fetch tool to get AWS OIDC documentation from "https://www.pulumi.com/docs/esc/integrations/dynamic-login-credentials/aws-login/"
2. Provide the user with the configuration
3. Ask the user if they have a pre-defined role or need one created for them
4. Set up as much of the environment as possible, then guide them through any steps that you can't do for them
5. Help them test with `pulumi env get` or `pulumi env open` if necessary
Common Workflows
Creating an Environment
pulumi env init my-org/my-project/dev-config
# Edit environment (accepts new definition from a file, better for agents, more difficult for users)
pulumi env edit --file /tmp/example.yml my-org/my-project/dev-config
Linking to Stack
pulumi config env add my-project/dev-config
pulumi config # Verify environment values are accessible
API Access (Rare)
Always prefer CLI commands. Only use the API when absolutely necessary (e.g., bulk operations, automation).
Available API endpoints include:
GET /api/esc/environments/{orgName}- List environmentsGET /api/esc/environments/{orgName}/{projectName}/{envName}- Read environment definitionGET /api/esc/providers?orgName={orgName}- List available providers
Use the pulumi api CLI subcommand to make requests when needed, e.g. pulumi api /api/esc/providers -F orgName={orgName}.
Best Practices
- Always use
fn::secretfor sensitive values - Prefer OIDC over static keys
- Use descriptive names like
<org>/my-app/production-awsnot<org>/app/prod - Layer environments: base → cloud-provider → stack-specific
- Verify that
pulumi configshows expected values after linking an environment to a stack - Prefer using
pulumi env runfor commands needing environment variables - Only use
pulumi env openwhen absolutely necessary, as it reveals secrets - Before using an existing environment, verify its account and role and get the user's confirmation; never select one by name alone. Never link an environment to a stack (
pulumi config env add) without explicit user confirmation, and never pass--yes.
Handling Credential Errors and Existing Environments
Credential errors
Start with the remediation in the error message. An expired or missing login usually just needs the user to re-authenticate, and most providers name the fix or the command:
- AWS SSO:
Failed to refresh cached SSO credentials. Please refresh SSO login.→aws sso login - AWS temporary credentials:
ExpiredToken: The security token included in the request is expired→ refresh the session or keys - Azure: re-run
az login - GCP: re-run
gcloud auth application-default login - Pulumi Cloud (401 / unauthorized):
pulumi login
Relay the fix and have the user retry. If the error does not name a remediation
(for example a bare Unable to locate credentials, or an access-denied that may
mean the wrong account or profile rather than an expired login), don't guess —
identify how the project authenticates (provider config, the active profile, any
linked ESC environment) and address that.
Changing where the project gets its credentials (adding or switching an ESC environment, editing provider config) is a deliberate change, not a reflexive fix for an expired session. Do it only if the user wants it, and follow the rules below.
Never select an existing environment by name
Do not pick an environment because its name looks relevant (*-aws-oidc,
*-creds, *-workshop, etc.). A matching name does not mean it is the right
one or that it belongs to this user's work.
Before proposing any existing environment:
- Inspect it with
pulumi env get <org>/<project>/<env>. - Confirm the target it authenticates to matches where the user's resources
actually live. An OIDC
roleArnnames a specific AWS account — if it points at a different account (a shared workshop, an instructor role, another team), it is the wrong environment and will run operations against the wrong account or fail. - Show the candidate to the user and confirm it is theirs and correct before using it.
Linking an environment changes which credentials operations use — confirm first
pulumi config env add edits the stack config (Pulumi.<stack>.yaml) and
changes the credentials Pulumi operations run under. Never run it without
explicit user confirmation, and never pass --yes to skip that confirmation.
Tell the user what will change and let them decide.
Verify before claiming it worked
After linking, resolved credential values often show as [unknown] until the
environment is opened or run. Do not claim the error is fixed or that the next
operation will succeed until you have verified it — check pulumi config, and
confirm the credentials resolve to the expected account before declaring success.
Quick troubleshooting
- "Environment not found": Check permissions with
pulumi env ls -o <org> - "Secret decryption failed": Use
pulumi env opennotpulumi env get - "Stack can't read values": Verify
pulumi config env lsto ensure the stack is listed.- Ensure the environment is referenced only by the project-name/environment-name format.
- Get the specific environment definition with
pulumi env get <org>/<project-name>/<environment-name>. - Verify the
pulumiConfigkey exists and is nested under thevalueskey.
FAQ
What does the pulumi-esc skill do?
Guidance for working with Pulumi ESC (Environments, Secrets, and Configuration). Use when users ask about managing secrets, configuration, environments, short-term credentials, configuring OIDC for AWS, Azure, GCP, integrating with secret stores (AWS Secrets Manager, Azure Key Vault, HashiCorp Vault, 1Password), or using ESC with Pulumi stacks.
How do I install pulumi-esc?
Run npx skills add https://github.com/pulumi/agent-skills --skill pulumi-esc in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/pulumi-esc/ (personal) or .claude/skills/pulumi-esc/ (project).
Which AI agents can use pulumi-esc?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is pulumi-esc safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains pulumi-esc?
It is published by pulumi in pulumi/agent-skills, and it is an official skill from the maker of the technology it covers. It has 1,423 recorded installs.
More from pulumi/agent-skills
pulumi-best-practices
pulumi/agent-skills
Load when the user is writing, reviewing, or debugging Pulumi TypeScript/Python programs; asks about Output or apply() usage; wants to create ComponentResource classes; needs to refactor resources without destroying them (aliases); is setting up secrets or config; or is configuring a pulumi preview/up CI workflow. Also load for questions about resource dependency order, parent/child resource relationships, or pulumi.interpolate.
pulumi-arm-to-pulumi
pulumi/agent-skills
Convert or migrate Azure ARM (Azure Resource Manager) templates, Bicep templates, or code to Pulumi, including importing existing Azure resources. This skill MUST be loaded whenever a user requests migration, conversion, or import of ARM templates, Bicep templates, ARM code, Bicep code, or Azure resources to Pulumi.
pulumi-component
pulumi/agent-skills
Guide for authoring Pulumi ComponentResource classes. Use when creating reusable infrastructure components, designing component interfaces, setting up multi-language support, or distributing component packages.
pulumi-automation-api
pulumi/agent-skills
Load this skill when a user asks how to run Pulumi programmatically, embed Pulumi in an application, orchestrate multiple stacks in code, build a self-service infrastructure portal, replace pulumi CLI shell scripts with code, or use the Pulumi Automation API (LocalWorkspace, createOrSelectStack, inline programs). Also load for questions about multi-stack sequencing, parallel deployments, or passing outputs between stacks via code.
pulumi-terraform-to-pulumi
pulumi/agent-skills
Migrate Terraform/OpenTofu projects to Pulumi, including translating HCL source code and/or importing Terraform state into a Pulumi stack. Use when a user wants to convert Terraform to Pulumi, migrate from HCL, or import tfstate into Pulumi. Do NOT trigger for general Terraform-vs-Pulumi comparisons or questions about using both tools side-by-side.
pulumi-cdk-to-pulumi
pulumi/agent-skills
Load this skill when a user wants to migrate, convert, port, translate, or move an AWS CDK application (including CDK stacks, constructs, or CloudFormation-synthesized templates) to Pulumi. Phrases such as "convert CDK to Pulumi", "migrate CDK app", "port CDK stacks", "replace CDK with Pulumi", "stop using CDK". Do NOT load for general CDK questions, CDK-only help, or CDK vs Pulumi comparisons where no migration is requested.
Popular devops & cloud skills
microsoft-foundry
microsoft/azure-skills
Build, deploy, evaluate, optimize, fine-tune, and manage Microsoft Foundry agents, models, and resources end to end. USE FOR: foundry, azd ai agent, azd provision/deploy, hosted agent scaffold/develop/run/deploy/troubleshoot, prompt agent create, managed harness agent create, GitHub Copilot harness agent, create agent, update agent, add tool to agent, invoke agent, agent insights, evaluate agent, batch eval, continuous eval, continuous monitoring, agent CI/CD, optimize prompt, improve prompt, optimize agent instructions, Agent Optimizer scaffold, dataset curation from traces, deploy model, model fine-tuning (SFT/DPO/RFT), Foundry project, RBAC, role assignment, permissions, quota, capacity, region, deployment failure, AI Services, create Foundry resource, knowledge index, customize deployment, onboard, availability, training-data, grader, distillation, large file upload. DO NOT USE FOR: Azure Functions, App Service, general Azure deploy (use azure-deploy), general Azure prep (use azure
azure-diagnostics
microsoft/azure-skills
Debug Azure production issues on Azure using AppLens, Azure Monitor, resource health, and safe triage. WHEN: debug production issues, troubleshoot app service, app service high CPU, app service deployment failure, troubleshoot container apps, container app 503 or target port mismatch, troubleshoot functions, function telemetry missing or stopped after a config/connection-string change, troubleshoot AKS, VM RDP, Linux SSH, VM black screen, can't connect to VM, reset VM password, NSG or firewall blocking, kubectl cannot connect, kube-system/CoreDNS failures, pod pending, crashloop, node not ready, upgrade failures, analyze logs, KQL, insights, image pull failures, cold start issues, health probe failures, resource health, root cause of errors, troubleshoot event hubs, troubleshoot service bus, messaging SDK error, AMQP connection failure, message lock lost, lock renewal during long-running processing, service bus dead letter.
azure-prepare
microsoft/azure-skills
Prepare azd-based Azure projects for deployment: generates azure.yaml, infrastructure (Bicep/Terraform), and Dockerfiles for the Azure Developer CLI (azd) workflow. USE ONLY when the user explicitly wants to use azd as the deployment tool, or the project already has an azure.yaml file. DO NOT USE FOR: non-azd deployments, Python App Service code-only deploys (use python-appservice-deploy), or cross-cloud migration (use azure-cloud-migrate). WHEN: prepare app for azd, create azure.yaml, set up azd infrastructure, modernize app for Azure with azd, deploy with azd, function app, timer trigger, service bus trigger, event-driven function, managed identity, generate Bicep, generate Terraform, create and deploy to Azure.
azure-ai
microsoft/azure-skills
Use for Azure AI: Search, Speech, OpenAI, Document Intelligence. Helps with search, vector/hybrid search, speech-to-text, text-to-speech, transcription, OCR. WHEN: AI Search, query search, vector search, hybrid search, semantic search, speech-to-text, text-to-speech, transcribe, OCR, convert text to speech.
azure-deploy
microsoft/azure-skills
Execute Azure deployments for ALREADY-PREPARED applications that have existing .azure/deployment-plan.md and infrastructure files. DO NOT use this skill when the user asks to CREATE a new application — use azure-prepare instead. This skill runs azd up, azd deploy, terraform apply, and az deployment commands with built-in error recovery. Requires .azure/deployment-plan.md from azure-prepare and validated status from azure-validate. WHEN: "run azd up", "run azd deploy", "execute deployment", "push to production", "push to cloud", "go live", "ship it", "bicep deploy", "terraform apply", "publish to Azure", "launch on Azure". DO NOT USE WHEN: "create and deploy", "build and deploy", "create a new app", "set up infrastructure", "create and deploy to Azure using Terraform" — use azure-prepare for these.
azure-validate
microsoft/azure-skills
Pre-deployment validation for Azure readiness. Run deep checks on configuration, infrastructure (Bicep or Terraform), RBAC role assignments, managed identity permissions, and prerequisites before deploying. WHEN: validate my app, check deployment readiness, run preflight checks, verify configuration, check if ready to deploy, validate azure.yaml, validate Bicep, test before deploying, troubleshoot deployment errors, validate Azure Functions, validate function app, validate serverless deployment, verify RBAC roles, check role assignments, review managed identity permissions, what-if analysis, validate Container Apps deployment.