A Terraform module to create a Google Network Vpc on Google Cloud Services (GCP).
This module supports Terraform version 1 and is compatible with the Terraform Google Provider version 5.
This module is part of our Infrastructure as Code (IaC) framework that enables our users and customers to easily deploy and manage reusable, secure, and production-grade cloud infrastructure.
- Module Features
- Getting Started
- Module Argument Reference
- Module Outputs
- External Documentation
- Module Versioning
- About Mineiros
- Reporting Issues
- Contributing
- Makefile Targets
- License
A Terraform base module for creating a google_compute_network
resources required for building a VPC.
Most basic usage just setting required arguments:
module "terraform-google-network-vpc" {
source = "github.com/mineiros-io/terraform-google-network-vpc.git?ref=v0.2.0"
project = "example-project-id"
}
See variables.tf and examples/ for details and use-cases.
-
project
: (Optionalstring
)The ID of the project in which the resource belongs. If it is not set, the provider project is used.
-
name
: (Optionalstring
)The name of the VPC. The name will be used to prefix all associacted resources also.
-
description
: (Optionalstring
)An optional description of the VPC. The resource must be recreated to modify this field.
-
routing_mode
: (Optionalstring
)The network-wide routing mode to use. If set to
REGIONAL
, this network's cloud routers will only advertise routes with subnetworks of this network in the same region as the router. If set toGLOBAL
, this network's cloud routers will advertise routes with all subnetworks of this network, across regions. Possible values areREGIONAL
andGLOBAL
.Default is
"REGIONAL"
. -
delete_default_routes_on_create
: (Optionalbool
)If set to
true
, ensure that all routes within the network specified whose names begin withdefault-route
and with a next hop ofdefault-internet-gateway
are deleted.Default is
false
. -
auto_create_subnetworks
: (Optionalbool
)When set to true, the network is created in auto subnet mode and it will create a subnet for each region automatically across the
10.128.0.0/9
address range. When set tofalse
, the network is created incustom subnet mode
so the user can explicitly connect subnetwork resources.Default is
false
. -
mtu
: (Optionalstring
)Maximum Transmission Unit in bytes. The minimum value for this field is
1460
and the maximum value is1500
bytes.Default is
"1460"
. -
network_firewall_policy_enforcement_order
: (Optionalstring
)Set the order that Firewall Rules and Firewall Policies are evaluated. Default value is AFTER_CLASSIC_FIREWALL. Possible values are: BEFORE_CLASSIC_FIREWALL, AFTER_CLASSIC_FIREWALL.
Default is
null
. -
enable_ula_internal_ipv6
: (Optionalbool
)Enable ULA internal ipv6 on this network. Enabling this feature will assign a
/48
from Google defined ULA prefixfd20::/20
.Default is
false
. -
internal_ipv6_range
: (Optionalstring
)When enabling ula internal ipv6, caller optionally can specify the
/48
range they want from the Google defined ULA prefixfd20::/20
. The input must be a valid/48
ULA IPv6 address and within thefd20::/20
. The operation will fail if the specified/48
is already in use by another resource. If the field is not specified, then a/48
range will be randomly allocated fromfd20::/20
and returned via this field."Default is
null
.
-
module_enabled
: (Optionalbool
)Specifies whether resources in the module will be created.
Default is
true
. -
module_depends_on
: (Optionallist(dependency)
)A list of dependencies. Any object can be assigned to this list to define a hidden external dependency.
Example:
module_depends_on = [ google_project.project_id ]
The following attributes are exported in the outputs of the module:
-
vpc
: (object(vpc)
)The outputs of the created VPC.
This Module follows the principles of Semantic Versioning (SemVer).
Given a version number MAJOR.MINOR.PATCH
, we increment the:
MAJOR
version when we make incompatible changes,MINOR
version when we add functionality in a backwards compatible manner, andPATCH
version when we make backwards compatible bug fixes.
- Backwards compatibility in versions
0.0.z
is not guaranteed whenz
is increased. (Initial development) - Backwards compatibility in versions
0.y.z
is not guaranteed wheny
is increased. (Pre-release)
Mineiros is a remote-first company headquartered in Berlin, Germany that solves development, automation and security challenges in cloud infrastructure.
Our vision is to massively reduce time and overhead for teams to manage and deploy production-grade and secure cloud infrastructure.
We offer commercial support for all of our modules and encourage you to reach out if you have any questions or need help. Feel free to email us at [email protected] or join our Community Slack channel.
We use GitHub Issues to track community reported issues and missing features.
Contributions are always encouraged and welcome! For the process of accepting changes, we use Pull Requests. If you'd like more information, please see our Contribution Guidelines.
This repository comes with a handy Makefile.
Run make help
to see details on each available target.
This module is licensed under the Apache License Version 2.0, January 2004. Please see LICENSE for full details.
Copyright © 2020-2022 Mineiros GmbH