Specify a webhook-driven task for OpenClaw
Describe event inputs, validation, deduplication, and intended actions before integration work.
5,452,940 AI resources indexedWorking toward the world’s largest AI resource index.
Use when writing infrastructure-as-code with Pulumi using programming languages for cloud resource provisioning.
---
name: pulumi-basics-c88520c4276b
user-invocable: false
description: Use when writing infrastructure-as-code with Pulumi using programming languages for cloud resource provisioning.
allowed-tools: []
---
# Pulumi Basics
Infrastructure-as-code using real programming languages with Pulumi.
## Project Structure
```
my-infrastructure/
├── Pulumi.yaml # Project file
├── Pulumi.dev.yaml # Stack config
├── index.ts # Main program
└── package.json
```
## Pulumi.yaml
```yaml
name: my-infrastructure
user-invocable: false
runtime: nodejs
description: My infrastructure project
```
## TypeScript Example
```typescript
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
// Create VPC
const vpc = new aws.ec2.Vpc("main", {
cidrBlock: "10.0.0.0/16",
enableDnsHostnames: true,
tags: {
Name: "main-vpc",
},
});
// Create subnet
const subnet = new aws.ec2.Subnet("public", {
vpcId: vpc.id,
cidrBlock: "10.0.1.0/24",
availabilityZone: "us-east-1a",
});
// Export outputs
export const vpcId = vpc.id;
export const subnetId = subnet.id;
```
## Common Commands
```bash
# Create new project
pulumi new aws-typescript
# Preview changes
pulumi preview
# Apply changes
pulumi up
# Destroy resources
pulumi destroy
# View stack outputs
pulumi stack output
```
## Configuration
```bash
# Set config
pulumi config set aws:region us-east-1
# Set secret
pulumi config set --secret dbPassword mySecret123
# Get config
pulumi config get aws:region
```
## Best Practices
### Use Stack References
```typescript
const infraStack = new pulumi.StackReference("org/infra/prod");
const vpcId = infraStack.getOutput("vpcId");
```
### Component Resources
```typescript
class MyApp extends pulumi.ComponentResource {
constructor(name: string, args: MyAppArgs, opts?: pulumi.ComponentResourceOptions) {
super("custom:app:MyApp", name, {}, opts);
// Create resources
}
}
```
---
name: pulumi-basics-c88520c4276b
user-invocable: false
description: Use when writing infrastructure-as-code with Pulumi using programming languages for cloud resource provisioning.
allowed-tools: []
---
# Pulumi Basics
Infrastructure-as-code using real programming languages with Pulumi.
## Project Structure
```
my-infrastructure/
├── Pulumi.yaml # Project file
├── Pulumi.dev.yaml # Stack config
├── index.ts # Main program
└── package.json
```
## Pulumi.yaml
```yaml
name: my-infrastructure
user-invocable: false
runtime: nodejs
description: My infrastructure project
```
## TypeScript Example
```typescript
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
// Create VPC
const vpc = new aws.ec2.Vpc("main", {
cidrBlock: "10.0.0.0/16",
enableDnsHostnames: true,
tags: {
Name: "main-vpc",
},
});
// Create subnet
const subnet = new aws.ec2.Subnet("public", {
vpcId: vpc.id,
cidrBlock: "10.0.1.0/24",
availabilityZone: "us-east-1a",
});
// Export outputs
export const vpcId = vpc.id;
export const subnetId = subnet.id;
```
## Common Commands
```bash
# Create new project
pulumi new aws-typescript
# Preview changes
pulumi preview
# Apply changes
pulumi up
# Destroy resources
pulumi destroy
# View stack outputs
pulumi stack output
```
## Configuration
```bash
# Set config
pulumi config set aws:region us-east-1
# Set secret
pulumi config set --secret dbPassword mySecret123
# Get config
pulumi config get aws:region
```
## Best Practices
### Use Stack References
```typescript
const infraStack = new pulumi.StackReference("org/infra/prod");
const vpcId = infraStack.getOutput("vpcId");
```
### Component Resources
```typescript
class MyApp extends pulumi.ComponentResource {
constructor(name: string, args: MyAppArgs, opts?: pulumi.ComponentResourceOptions) {
super("custom:app:MyApp", name, {}, opts);
// Create resources
}
}
```
Imported from the listed AgentSkill.sh category. Complete supplied package files and notices are retained. Required external tools and credentials are not installed. No bundled code was executed during import. Individual agent task behavior has not been tested.