-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsn.tf
76 lines (63 loc) · 1.98 KB
/
sn.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
resource "aws_subnet" "public-a" {
vpc_id = "${aws_vpc.the_vpc.id}"
cidr_block = "${var.first-2-octets}.0.0/21"
availability_zone = "${var.aws_region}a"
map_public_ip_on_launch = "false"
tags {
Name = "${var.tag_prefix}-public-a"
}
}
resource "aws_subnet" "public-b" {
vpc_id = "${aws_vpc.the_vpc.id}"
cidr_block = "${var.first-2-octets}.8.0/21"
availability_zone = "${var.aws_region}b"
map_public_ip_on_launch = "false"
tags {
Name = "${var.tag_prefix}-public-b"
}
}
resource "aws_subnet" "public-c" {
vpc_id = "${aws_vpc.the_vpc.id}"
cidr_block = "${var.first-2-octets}.16.0/21"
availability_zone = "${var.aws_region}c"
map_public_ip_on_launch = "false"
tags {
Name = "${var.tag_prefix}-public-c"
}
}
resource "aws_subnet" "packer-a" {
vpc_id = "${aws_vpc.the_vpc.id}"
cidr_block = "${var.first-2-octets}.32.0/21"
availability_zone = "${var.aws_region}a"
map_public_ip_on_launch = "true"
tags {
Name = "${var.tag_prefix}-packer-a"
}
}
resource "aws_subnet" "private-a" {
vpc_id = "${aws_vpc.the_vpc.id}"
cidr_block = "${var.first-2-octets}.128.0/20"
availability_zone = "${var.aws_region}a"
map_public_ip_on_launch = "false"
tags {
Name = "${var.tag_prefix}-private-a"
}
}
resource "aws_subnet" "private-b" {
vpc_id = "${aws_vpc.the_vpc.id}"
cidr_block = "${var.first-2-octets}.144.0/20"
availability_zone = "${var.aws_region}b"
map_public_ip_on_launch = "false"
tags {
Name = "${var.tag_prefix}-private-b"
}
}
resource "aws_subnet" "private-c" {
vpc_id = "${aws_vpc.the_vpc.id}"
cidr_block = "${var.first-2-octets}.160.0/20"
availability_zone = "${var.aws_region}c"
map_public_ip_on_launch = "false"
tags {
Name = "${var.tag_prefix}-private-c"
}
}