-
Notifications
You must be signed in to change notification settings - Fork 1
/
subnets.tf
48 lines (48 loc) · 1.43 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
resource "aws_subnet" "public_subnet_1" {
vpc_id = aws_vpc.main.id
cidr_block = var.public_subnet_1_cidr
availability_zone = var.us-east-1b_availability_zone
tags = {
Name = var.public_subnet_1_name
}
}
resource "aws_subnet" "public_subnet_2" {
vpc_id = aws_vpc.main.id
cidr_block = var.public_subnet_2_cidr
availability_zone = var.us-east-1c_availability_zone
tags = {
Name = var.public_subnet_2_name
}
}
resource "aws_subnet" "public_subnet_3" {
vpc_id = aws_vpc.main.id
cidr_block = var.public_subnet_3_cidr
availability_zone = var.us-east-1d_availability_zone
tags = {
Name = var.public_subnet_3_name
}
}
resource "aws_subnet" "private_subnet_1" {
vpc_id = aws_vpc.main.id
cidr_block = var.private_subnet_1_cidr
availability_zone = var.us-east-1b_availability_zone
tags = {
Name = var.private_subnet_1_name
}
}
resource "aws_subnet" "private_subnet_2" {
vpc_id = aws_vpc.main.id
cidr_block = var.private_subnet_2_cidr
availability_zone = var.us-east-1c_availability_zone
tags = {
Name = var.private_subnet_2_name
}
}
resource "aws_subnet" "private_subnet_3" {
vpc_id = aws_vpc.main.id
cidr_block = var.private_subnet_3_cidr
availability_zone = var.us-east-1d_availability_zone
tags = {
Name = var.private_subnet_3_name
}
}