GCP VPC
With Google Virtual Private Cloud networks (Google VPC), you can launch GCP resources in a logically isolated virtual network that you’ve defined. This virtual network closely resembles a traditional network that you’d operate in your own data center, with the benefits of using the scalable infrastructure of GCP.
This module creates a GCP VPC with these constraints:
By default, the VPC is global
All subnets are in the same region chosen by user
List of public and private subnets can be created
List of private subnets for VPC-native Kubernetes clusters can be created
All created subnets are of purpose
PRIVATE_RFC_1918Create subnet flow logs in Stackdriver
All traffic are captured in flow logs
Subnetwork without external IP addresses can access Google APIs and services by using Private Google Access
If external access enabled, use a NAT router for public subnets
Requirements
Name |
Version |
|---|---|
>= 1.0 |
|
>= 4.75.0 |
Providers
Name |
Version |
|---|---|
>= 4.75.0 |
Modules
No modules.
Resources
Name |
Type |
|---|---|
resource |
|
resource |
|
resource |
|
resource |
|
resource |
|
data source |
Inputs
Name |
Description |
Type |
Default |
Required |
|---|---|---|---|---|
Creation of a subnet for each region automatically |
|
|
no |
|
Default routes (0.0.0.0/0) will be deleted immediately after network creation |
|
|
no |
|
Access Google APIs and services by using Private Google Access |
|
|
no |
|
Enable ULA internal ipv6 on this network |
|
|
no |
|
The maximum interval of time during which a flow of packets is captured and aggregated into a flow log |
|
|
no |
|
The GKE subnet. The subnet contains a name, a CIDR block for nodes, a CIDR block for Pods, a CIDR block for services and a region |
object({ |
|
no |
|
Specify the /48 range they want from the google defined ULA prefix fd20::/20 |
|
|
no |
|
Maximum Transmission Unit in bytes |
|
|
no |
|
Name of the VPC |
|
n/a |
yes |
|
Set the order that Firewall Rules and Firewall Policies are evaluated |
|
|
no |
|
The network-wide routing mode to use |
|
|
no |
|
A map of subnets inside the VPC. Each subnet object has a CIDR block, a region, and a boolean set to true if the subnet is public, or false if the subnet is private |
map(object({ |
|
no |
Outputs
Name |
Description |
|---|---|
The gateway address for default routing out of the network. This value is selected by GCP |
|
GKE subnet CIDR block |
|
GKE subnet ID |
|
GKE subnet name |
|
IP CIDR block of GKE Pods |
|
IP CIDR range name of GKE Pods |
|
GKE subnet region |
|
GKE subnet self link |
|
IP CIDR block of GKE services |
|
IP CIDR range name of GKE services |
|
The ID of the VPC |
|
The name of the VPC |
|
List of private subnet CIDR blocks |
|
List of private subnet IDs |
|
List of private subnet regions |
|
List of private subnet self links |
|
List of public subnet CIDR blocks |
|
List of public subnet IDs |
|
List of public subnet regions |
|
List of public subnet self links |
|
The URI of the created resource |