Skip to content

Commit dae6835

Browse files
authored
Update pulumi-stacks.md
A little example how the stack and stacks work together
1 parent ad9e411 commit dae6835

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

content/docs/esc/integrations/infrastructure/pulumi-iac/pulumi-stacks.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,26 @@ values:
3030
privateSubnetIds: ${stackRefs.vpcInfra.privateSubnetIds}
3131
```
3232
33+
Where your stack file is for e.g.
34+
```py
35+
# __main__.py
36+
import pulumi
37+
import pulumi_awsx as awsx
38+
39+
# Fetch the default VPC for the current AWS region.
40+
vpc = awsx.ec2.DefaultVpc("default-vpc")
41+
42+
# Export a few properties to make them easy to use.
43+
pulumi.export("vpcId", vpc.vpc_id)
44+
pulumi.export("publicSubnetIds", vpc.public_subnet_ids)
45+
pulumi.export("privateSubnetIds", vpc.private_subnet_ids)
46+
```
47+
3348
## Inputs
3449

35-
| Property | Type | Description |
36-
|----------|----------------------------------------|-----------------------------------------------|
37-
| `stacks` | map[string][PulumiStack](#pulumistack) | A map of names to stacks to get outputs from. |
50+
| Property | Type | Description |
51+
|----------|----------------------------------------|---------------------------------------------------------------------------------------------|
52+
| `stacks` | map[string][PulumiStack](#pulumistack) | A map of names to stacks to get outputs from. The names contains all outputs from the stack |
3853

3954
### PulumiStack
4055

0 commit comments

Comments
 (0)