File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -39,3 +39,11 @@ resource "google_compute_subnetwork" "subnetwork" {
3939
4040 secondary_ip_range = " ${ var . secondary_ranges [lookup (var. subnets [count . index ], " subnet_name" )]} "
4141}
42+
43+ /* *****************************************
44+ Shared VPC
45+ *****************************************/
46+ resource "google_compute_shared_vpc_host_project" "shared_vpc_host" {
47+ count = " ${ var . shared_vpc_host == " true" ? 1 : 0 } "
48+ project = " ${ var . project_id } "
49+ }
Original file line number Diff line number Diff line change @@ -33,3 +33,9 @@ variable "secondary_ranges" {
3333 type = " map"
3434 description = " Secondary ranges that will be used in some of the subnets"
3535}
36+
37+ variable "shared_vpc_host" {
38+ type = " string"
39+ description = " Makes this project a Shared VPC host if 'true' (default 'false')"
40+ default = " false"
41+ }
You can’t perform that action at this time.
0 commit comments