dirien/yet-another-agent-harness / .claude/skills/pulumi-python
pulumi-python
VerifiedCreates Pulumi infrastructure-as-code projects in Python, defines cloud resources (AWS, Azure, GCP), configures ESC environments for secrets management, sets up OIDC authentication for secure deployments, and builds multi-language component resources. Use when creating Pulumi Python projects, writing infrastructure code, configuring cloud providers, managing secrets with Pulumi ESC, setting up OIDC for Pulumi, automating infrastructure deployments with Python, creating reusable Pulumi components in Python, or configuring Python toolchains (pip, poetry, uv) for Pulumi. Also use when the user mentions pyproject.toml with Pulumi, component_provider_host, or Python virtual environments for infrastructure code.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 12.1 KB |
| evals/evals.json | config | 3.1 KB |
| references/pulumi-best-practices-aws.md | markdown | 6.6 KB |
| references/pulumi-best-practices-azure.md | markdown | 8.4 KB |
| references/pulumi-best-practices-gcp.md | markdown | 8.7 KB |
| references/pulumi-esc.md | markdown | 3.6 KB |
| references/pulumi-patterns.md | markdown | 8.2 KB |
| references/pulumi-python.md | markdown | 5.4 KB |
references/pulumi-esc.md
View on GitHub# Pulumi ESC Reference
## Overview
Pulumi ESC (Environments, Secrets, and Configuration) provides centralized secrets management and orchestration for infrastructure and applications.
## Pulumi ESC Commands
### Environment Management
```bash
# Create environment
pulumi env init <org>/<project>/<env>
pulumi env init myorg/myproject/dev
# List environments
pulumi env ls
pulumi env ls myorg
# Edit environment (opens editor)
pulumi env edit <org>/<env>
# View environment definition
pulumi env get <org>/<env> --show-secrets
# Delete environment
pulumi env rm <org>/<env>
# Clone environment
pulumi env clone <org>/<source> <org>/<target>
```
### Working with Values
```bash
# Set a value
pulumi env set <org>/<env> <path> <value>
pulumi env set myorg/dev pulumiConfig.aws:region us-west-2
# Set a secret
pulumi env set <org>/<env> <path> <value> --secret
# Get a specific value
pulumi env get <org>/<env> <path>
pulumi env get myorg/dev pulumiConfig.aws:region
```
### Running Commands
```bash
# Run command with environment
pulumi env run <org>/<env> -- <command>
pulumi env run myorg/aws-dev -- pulumi up
pulumi env run myorg/aws-dev -- aws s3 ls
# Open environment (resolve and display)
pulumi env open <org>/<env>
pulumi env open <org>/<env> --format json
pulumi env open <org>/<env> --format shell
pulumi env open <org>/<env> --format dotenv
```
### Versioning
```bash
# List versions
pulumi env version ls <org>/<env>
# Tag a version
pulumi env version tag <org>/<env> <tag>
pulumi env version tag myorg/prod stable
# Rollback to version
pulumi env version rollback <org>/<env> <version>
# Diff versions
pulumi env diff <org>/<env>@<v1> <org>/<env>@<v2>
```
## ESC Environment Syntax
### Basic Structure
```yaml
imports:
- base-environment
values:
staticConfig:
region: us-west-2
environment: production
secrets:
apiKey:
fn::secret: "my-secret-value"
pulumiConfig:
aws:region: ${staticConfig.region}
myapp:apiKey: ${secrets.apiKey}
environmentVariables:
AWS_REGION: ${staticConfig.region}
MY_API_KEY: ${secrets.apiKey}
```
### Dynamic Providers
#### AWS OIDC Login
```yaml
values:
aws:
login:
fn::open::aws-login:
oidc:
roleArn: arn:aws:iam::123456789012:role/pulumi-oidc-role
sessionName: pulumi-${context.pulumi.user.login}
duration: 1h
```
#### AWS Secrets Manager
```yaml
values:
secrets:
fn::open::aws-secrets:
region: us-west-2
login: ${aws.login}
get:
dbPassword:
secretId: prod/db/password
apiKey:
secretId: prod/api/key
```
#### Azure OIDC Login
```yaml
values:
azure:
login:
fn::open::azure-login:
clientId: <app-client-id>
tenantId: <tenant-id>
subscriptionId: <subscription-id>
oidc: true
```
#### GCP OIDC Login
```yaml
values:
gcp:
login:
fn::open::gcp-login:
project: my-project-id
oidc:
workloadPoolId: pulumi-pool
providerId: pulumi-provider
serviceAccount: pulumi@my-project.iam.gserviceaccount.com
```
## Integration with Pulumi IaC
### Linking ESC to Stacks
```bash
pulumi config env add <org>/<env>
pulumi config env rm <org>/<env>
pulumi config env ls
```
### Accessing Config in Python Code
```python
import pulumi
config = pulumi.Config()
aws_config = pulumi.Config("aws")
# Values from pulumiConfig block
region = aws_config.require("region")
instance_type = config.require("myapp:instanceType")
# Secrets (returns Output[str])
api_key = config.require_secret("myapp:apiKey")
# Optional values with defaults
debug = config.get_bool("debug") or False
```
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |