forked from bregman-arie/devops-exercises
-
Notifications
You must be signed in to change notification settings - Fork 0
/
__main__.py
26 lines (21 loc) · 810 Bytes
/
__main__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import pulumi_aws as aws
availableZones = aws.get_availability_zones(state="available")
aws.ec2.Subnet("NewSubnet1",
vpc_id=aws.vpc["main"]["id"],
cidr_block="10.0.0.0/24",
availability_zone=availableZones.names[0],
tags={"Name": "NewSubnet1"}
)
aws.ec2.Subnet("NewSubnet2",
vpc_id=aws.vpc["main"]["id"],
cidr_block="10.0.1.0/24",
availability_zone=availableZones.names[1],
tags={"Name": "NewSubnet2"}
)
aws.ec2.Subnet("NewSubnet3",
vpc_id=aws.vpc["main"]["id"],
cidr_block="10.0.2.0/24",
availability_zone=availableZones.names[2],
tags={"Name": "NewSubnet3"}
)
# Run "pulumi up"