-
Notifications
You must be signed in to change notification settings - Fork 1
/
subnets.tf
61 lines (54 loc) · 1.37 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
49
50
51
52
53
54
55
56
57
58
59
60
61
/*
Public Subnets
*/
resource "aws_subnet" "public_a" {
vpc_id = "${aws_vpc.main.id}"
cidr_block = "${var.public_subnet_a_cidr}"
availability_zone = "${var.region}a"
tags = {
Name = "${var.vpc_name}-public-a"
}
}
resource "aws_subnet" "public_b" {
vpc_id = "${aws_vpc.main.id}"
cidr_block = "${var.public_subnet_b_cidr}"
availability_zone = "${var.region}b"
tags = {
Name = "${var.vpc_name}-public-b"
}
}
resource "aws_subnet" "public_c" {
vpc_id = "${aws_vpc.main.id}"
cidr_block = "${var.public_subnet_c_cidr}"
availability_zone = "${var.region}c"
tags = {
Name = "${var.vpc_name}-public-c"
}
}
/*
Private Subnets
*/
resource "aws_subnet" "private_a" {
vpc_id = "${aws_vpc.main.id}"
cidr_block = "${var.private_subnet_a_cidr}"
availability_zone = "${var.region}a"
tags = {
Name = "${var.vpc_name}-private-a"
}
}
resource "aws_subnet" "private_b" {
vpc_id = "${aws_vpc.main.id}"
cidr_block = "${var.private_subnet_b_cidr}"
availability_zone = "${var.region}b"
tags = {
Name = "${var.vpc_name}-private-b"
}
}
resource "aws_subnet" "private_c" {
vpc_id = "${aws_vpc.main.id}"
cidr_block = "${var.private_subnet_c_cidr}"
availability_zone = "${var.region}c"
tags = {
Name = "${var.vpc_name}-private-c"
}
}