-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1-vpc.tf
More file actions
32 lines (29 loc) · 739 Bytes
/
1-vpc.tf
File metadata and controls
32 lines (29 loc) · 739 Bytes
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
locals {
vpc_basename = "gke-vpc"
vpc_subnet_basename = "gke-subnet-01"
}
module "vpc" {
source = "terraform-google-modules/network/google"
version = "~> 10.0"
project_id = local.project_id
network_name = local.vpc_basename
subnets = [
{
subnet_name = local.vpc_subnet_basename
subnet_ip = "10.0.1.0/24"
subnet_region = local.region
}
]
secondary_ranges = {
"${local.vpc_subnet_basename}" = [
{
range_name = "${local.vpc_subnet_basename}-ip-range-pods"
ip_cidr_range = "192.168.1.0/24"
},
{
range_name = "${local.vpc_subnet_basename}-ip-range-services"
ip_cidr_range = "192.168.2.0/24"
}
]
}
}