Skip to content

borgeslima/gcp-network-module

 
 

Repository files navigation

GCP VPC Terraform module

Terraform module which creates VPC resources on GCP.

Usage

 module "network" {
    source                             = "git::git@github.com:quarks-labs/gcp-container-cluster-module.git"
    region                             = local.region
    name                               = local.name
    auto_create_subnetworks            = local.auto_create_subnetworks
    project                            = local.project

    subnetworks = [{
        name                     = "default-01"
        region                   = "us-east1"
        ip_cidr_range            = "172.28.0.0/27"
        private_ip_google_access = false
        nat = {
            nat_ip_allocate_option             = "MANUAL_ONLY"
            source_subnetwork_ip_ranges_to_nat = "LIST_OF_SUBNETWORKS"
        }
        secondary_ip_ranges = [{
            range_name    = "primary"
            ip_cidr_range = "172.1.16.0/20"
        },
        {
            range_name    = "secondary"
            ip_cidr_range = "172.1.32.0/20"
            }]
        }]
    }


Contributing

Report issues/questions/feature requests on in the issues section.

Full contributing guidelines are covered here.

Requirements

Name Version
terraform >= 0.14
google 5.24.0

Providers

Name Version
google 5.24.0

Modules

No modules.

Resources

Name Type
google_compute_address.this resource
google_compute_network.this resource
google_compute_router.this resource
google_compute_router_nat.this resource
google_compute_subnetwork.this resource

Inputs

Name Description Type Default Required
auto_create_subnetworks If auto_crea_subnetworks is true, subnet is created automality bool n/a yes
name Name of GCP Network string n/a yes
project Name of GCP Network string n/a yes
region GCP Region string n/a yes
subnetworks Name of GCP Network string n/a yes

Outputs

Name Description
google_compute_network_auto_create_subnetworks auto_create_subnetworks of network
google_compute_network_description Description of network
google_compute_network_gateway_ipv4 gateway_ipv4 of network
google_compute_network_id id of network
google_compute_network_internal_ipv6_range internal_ipv6_range of network
google_compute_network_name Name of network

About

Why complicate things if we can simplify?

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HCL 100.0%