-
Notifications
You must be signed in to change notification settings - Fork 0
/
_subnet.tf
59 lines (52 loc) · 1.76 KB
/
_subnet.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
# Availability Zone 1
# {
# =========================================================================
# Public 1 Subnet
# =========================================================================
resource "aws_subnet" "tf_test_public_subnet_1" {
vpc_id = aws_vpc.tf_test_vpc.id
availability_zone = "ap-southeast-1a"
cidr_block = "192.168.0.0/24"
map_public_ip_on_launch = true
tags = {
Name = "tf_test_public_subnet_1"
}
}
# =========================================================================
# Private 1 Subnet
# =========================================================================
resource "aws_subnet" "tf_test_private_subnet_1" {
vpc_id = aws_vpc.tf_test_vpc.id
availability_zone = "ap-southeast-1a"
cidr_block = "192.168.1.0/24"
tags = {
Name = "tf_test_private_subnet_1"
}
}
# }
# # Availability Zone 2
# {
# =========================================================================
# Public 2 Subnet
# =========================================================================
resource "aws_subnet" "tf_test_public_subnet_2" {
vpc_id = aws_vpc.tf_test_vpc.id
availability_zone = "ap-southeast-1b"
cidr_block = "192.168.2.0/24"
map_public_ip_on_launch = true
tags = {
Name = "tf_test_public_subnet_2"
}
}
# =========================================================================
# Private 2 Subnet
# =========================================================================
resource "aws_subnet" "tf_test_private_subnet_2" {
vpc_id = aws_vpc.tf_test_vpc.id
availability_zone = "ap-southeast-1b"
cidr_block = "192.168.3.0/24"
tags = {
Name = "tf_test_private_subnet_2"
}
}
# }