Skip to content

Latest commit

 

History

History
 
 

shared_vpcs

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

GCP shared vpc Terraform module

Terraform module which sets up peering between vpcs on different projects

Usage

module "shared_vpc" {
  source              = "../../modules/shared_vpcs"
  project             = "myProject"
  host_project        = "myHostProject"
  shared_vpcs         = ["shared-vpc"]
  vpcs                = ["weka-vpc-0", "weka-vpc-1", "weka-vpc-2", "weka-vpc-3"]
  sa_email            = "[email protected]"
  host_shared_range   = ["10.26.1.0/24"]
  providers = {
    google.shared-vpc = hostProvider
  }
}

Requirements

Name Version
terraform >=1.3.1
google >=6.21.0

Providers

Name Version
google >=6.21.0

Modules

No modules.

Resources

Name Type
google_compute_firewall.sg_private resource
google_compute_firewall.sg_private_egress resource
google_compute_network_peering.host_peering resource
google_compute_network_peering.peering_service resource
google_compute_shared_vpc_host_project.shared_vpc_host resource
google_compute_shared_vpc_service_project.shared_vpc_service resource
google_compute_network.vpc_list_ids data source

Inputs

Name Description Type Default Required
enable_shared_vpc_host_project If this project is a shared VPC host project. If true, you must not set shared_vpc variable. Default is false. bool false no
host_project The ID of the project that will serve as a Shared VPC host project string n/a yes
host_shared_range list of host range to allow sg list(string) [] no
peering_name Peering name. The name format will be -<peering_name>- string "peering" no
prefix prefix for all resources string "weka" no
project_id project id string n/a yes
set_shared_vpc_peering n/a bool false no
shared_vpc_project_id Shared vpc project id string n/a yes
shared_vpcs list of shared vpc name list(string) n/a yes
vpcs_name list of vpcs name list(string) n/a yes

Outputs

No outputs.