-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvpc.tf
More file actions
48 lines (46 loc) · 1.29 KB
/
vpc.tf
File metadata and controls
48 lines (46 loc) · 1.29 KB
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
provider "google" {
credentials = "${file("robust-form-362412-74d8b1e1b512.json")}"
project = "robust-form-362412"
region = "asia-south1"
zone = "asia-south1-c"
}
resource "google_compute_network" "vpc_network" {
name = "dev-vpc"
auto_create_subnetworks = "false"
}
resource "google_compute_subnetwork" "public-subnetwork" {
name = "dev-public-subnet-1"
ip_cidr_range = "10.2.0.0/16"
region = "asia-south1"
network = google_compute_network.vpc_network.name
secondary_ip_range {
range_name = "sec-range-1"
ip_cidr_range = "10.0.26.0/24"
}
secondary_ip_range {
range_name = "sec-range-2"
ip_cidr_range = "10.0.28.0/24"
}
}
resource "google_compute_subnetwork" "private-subnetwork-1" {
name = "dev-private-subnet1"
private_ip_google_access = "true"
ip_cidr_range = "10.3.0.0/16"
region = "asia-south1"
network = google_compute_network.vpc_network.name
secondary_ip_range {
range_name = "sec-range-3"
ip_cidr_range = "10.0.22.0/24"
}
}
resource "google_compute_subnetwork" "private-subnetwork-2" {
name = "dev-private-subnet2"
private_ip_google_access = "true"
ip_cidr_range = "10.4.0.0/16"
region = "asia-south1"
network = google_compute_network.vpc_network.name
secondary_ip_range {
range_name = "sec-range-4"
ip_cidr_range = "10.0.23.0/24"
}
}