-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsubnets.tf
34 lines (31 loc) · 900 Bytes
/
subnets.tf
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
27
28
29
30
31
32
33
34
## Demo subnets
# Web tier subnet
resource "aws_subnet" "terraform-demo-snet-web" {
vpc_id = aws_vpc.terraform-demo-vpc.id
cidr_block = "10.0.0.0/21"
map_public_ip_on_launch = "true"
availability_zone = "eu-central-1a"
tags = {
Name = "terraform-demo-snet-web"
}
}
# Application tier subnet
resource "aws_subnet" "terraform-demo-snet-app" {
vpc_id = aws_vpc.terraform-demo-vpc.id
cidr_block = "10.0.8.0/21"
map_public_ip_on_launch = "false"
availability_zone = "eu-central-1a"
tags = {
Name = "terraform-demo-snet-app"
}
}
# Database tier subnet
resource "aws_subnet" "terraform-demo-snet-db" {
vpc_id = aws_vpc.terraform-demo-vpc.id
cidr_block = "10.0.16.0/21"
map_public_ip_on_launch = "false"
availability_zone = "eu-central-1a"
tags = {
Name = "terraform-demo-snet-db"
}
}