-
Notifications
You must be signed in to change notification settings - Fork 0
/
vpc.tf
30 lines (27 loc) · 783 Bytes
/
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
locals {
network_name = var.vpc_name
}
module "vpc" {
depends_on = [
module.enabled_google_apis,
module.project_factory
]
source = "terraform-google-modules/network/google"
version = ">= 4.0.1, < 5.0.0"
project_id = var.project_id
network_name = local.network_name
routing_mode = "GLOBAL"
# shared_vpc_host = "true"
subnets = [
{
subnet_name = "${local.network_name}-subnet-01"
subnet_ip = var.subnet_cidr_01
subnet_region = var.primary_region
},
{
subnet_name = "${local.network_name}-subnet-02"
subnet_ip = var.subnet_cidr_02
subnet_region = var.primary_region
}
]
}