This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 48
/
Copy pathvpc.tf
70 lines (60 loc) · 2.17 KB
/
vpc.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
resource "yandex_vpc_network" "vpc-infra" {
name = "vpc-infra"
}
resource "yandex_vpc_route_table" "route-to-remote" {
name = "route-to-remote"
network_id = yandex_vpc_network.vpc-infra.id
static_route {
destination_prefix = "192.168.0.0/24"
next_hop_address = "10.10.5.5"
}
}
resource "yandex_vpc_subnet" "frontend-subnet-a" {
name = "frontend-subnet-a"
zone = "ru-central1-a"
network_id = yandex_vpc_network.vpc-infra.id
v4_cidr_blocks = ["10.240.1.0/24"]
route_table_id = yandex_vpc_route_table.route-to-remote.id
}
resource "yandex_vpc_subnet" "frontend-subnet-b" {
name = "frontend-subnet-b"
zone = "ru-central1-b"
network_id = yandex_vpc_network.vpc-infra.id
v4_cidr_blocks = ["10.240.2.0/24"]
route_table_id = yandex_vpc_route_table.route-to-remote.id
}
resource "yandex_vpc_subnet" "frontend-subnet-c" {
name = "frontend-subnet-c"
zone = "ru-central1-c"
network_id = yandex_vpc_network.vpc-infra.id
v4_cidr_blocks = ["10.240.3.0/24"]
route_table_id = yandex_vpc_route_table.route-to-remote.id
}
resource "yandex_vpc_subnet" "vpn-subnet-a" {
name = "vpn-subnet-a"
zone = "ru-central1-a"
network_id = yandex_vpc_network.vpc-infra.id
v4_cidr_blocks = ["10.10.5.0/24"]
route_table_id = yandex_vpc_route_table.route-to-remote.id
}
resource "yandex_vpc_subnet" "backend-subnet-a" {
name = "backend-subnet-a"
zone = "ru-central1-a"
network_id = yandex_vpc_network.vpc-infra.id
v4_cidr_blocks = ["10.110.1.0/24"]
route_table_id = yandex_vpc_route_table.route-to-remote.id
}
resource "yandex_vpc_subnet" "backend-subnet-b" {
name = "backend-subnet-b"
zone = "ru-central1-b"
network_id = yandex_vpc_network.vpc-infra.id
v4_cidr_blocks = ["10.110.2.0/24"]
route_table_id = yandex_vpc_route_table.route-to-remote.id
}
resource "yandex_vpc_subnet" "backend-subnet-c" {
name = "backend-subnet-c"
zone = "ru-central1-c"
network_id = yandex_vpc_network.vpc-infra.id
v4_cidr_blocks = ["10.110.3.0/24"]
route_table_id = yandex_vpc_route_table.route-to-remote.id
}