-
Notifications
You must be signed in to change notification settings - Fork 1
/
02-Subnets.tf
87 lines (71 loc) · 1.91 KB
/
02-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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#These are for public
resource "aws_subnet" "public-us-east-2a" {
vpc_id = aws_vpc.app1.id
cidr_block = "10.23.1.0/24"
availability_zone = "us-east-2a"
map_public_ip_on_launch = true
tags = {
Name = "public-us-east-2a"
Service = "application1"
Owner = "MajinVegeta"
Planet = "PlanetVegeta"
}
}
resource "aws_subnet" "public-us-east-2b" {
vpc_id = aws_vpc.app1.id
cidr_block = "10.23.2.0/24"
availability_zone = "us-east-2b"
map_public_ip_on_launch = true
tags = {
Name = "public-us-east-2b"
Service = "application1"
Owner = "MajinVegeta"
Planet = "PlanetVegeta"
}
}
resource "aws_subnet" "public-us-east-2c" {
vpc_id = aws_vpc.app1.id
cidr_block = "10.23.3.0/24"
availability_zone = "us-east-2c"
map_public_ip_on_launch = true
tags = {
Name = "public-us-east-2c"
Service = "application1"
Owner = "MajinVegeta"
Planet = "PlanetVegeta"
}
}
#these are for private
resource "aws_subnet" "private-us-east-2a" {
vpc_id = aws_vpc.app1.id
cidr_block = "10.23.11.0/24"
availability_zone = "us-east-2a"
tags = {
Name = "private-us-east-2a"
Service = "application1"
Owner = "Luke"
Planet = "Musafar"
}
}
resource "aws_subnet" "private-us-east-2b" {
vpc_id = aws_vpc.app1.id
cidr_block = "10.23.12.0/24"
availability_zone = "us-east-2b"
tags = {
Name = "private-us-east-2b"
Service = "application1"
Owner = "MajinVegeta"
Planet = "PlanetVegeta"
}
}
resource "aws_subnet" "private-us-east-2c" {
vpc_id = aws_vpc.app1.id
cidr_block = "10.23.13.0/24"
availability_zone = "us-east-2c"
tags = {
Name = "private-us-east-2c"
Service = "application1"
Owner = "MajinVegeta"
Planet = "PlanetVegeta"
}
}