/terraform-google-network

Primary LanguageHCLApache License 2.0Apache-2.0

Google Network Terraform module

Terraform module which creates network, subnets, and few peerings resources on Google Cloud Platform.

Examples

Modules

Name Source Version
vpc terraform-google-modules/network/google 7.0.0

Inputs

Name Description Type Default Required
gcp_peering_cidr The CIDR to reserve for GCP service in this VPC. string n/a yes
name The name of the network being created. string n/a yes
project_id The ID of the project where this VPC will be created. string n/a yes
subnets The list of subnets beeing created.
map(object({
name = string
region = string
primary_cidr = string
serverless_cidr = string
connector_specs = optional(object({
machine_type = optional(string, null)
min_throughput = optional(number, null)
min_instances = optional(number, null)
max_throughput = optional(number, null)
max_instances = optional(number, null)
}), {})
secondary_ranges = map(object({
name = string
cidr = string
}))
}))
n/a yes
nats The custom configuration for NAT gateways. The map key must be the nat region and there must be a subnet in that region. Possible values for mode are ENDPOINT_INDEPENDANT_MAPPING, DYNAMIC_PORT_ALLOCATION or NONE.
map(object({
mode = optional(string, "ENDPOINT_INDEPENDANT_MAPPING")
min_ports = optional(number, 64)
max_ports = optional(number, null)
}))
{} no
routing_mode The network routing mode (default 'GLOBAL'). string "GLOBAL" no

Outputs

Name Description
gcp_services_networking_connection The networking connection used by GCP for services like Cloud SQL
network The created network
network_id The ID of the VPC being created
network_name The name of the VPC being created
network_self_link The URI of the VPC being created
subnets A map with keys of form subnet_region/subnet_name and values being the outputs of the google_compute_subnetwork resources used to create corresponding subnets.
subnets_ids The IDs of the subnets being created
subnets_names The names of the subnets being created
vpc_access_connectors The VPC Access Connectors being created.

License

License

See LICENSE for full details.

Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

  https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.