This is a Dynamic module in Terraform to create compute Network(VPC). This module will be called from the ./env/dev.tf file.
- main.tf : contains all the resources, which will be created with
terraform apply
command. - variables.tf : contains all the variables required to create the resources.
- outputs.tf : print output attributes of the resources.
No requirements.
Name | Version |
---|---|
n/a |
No modules.
Name | Type |
---|---|
google_compute_firewall.http_compute_firewall | resource |
google_compute_firewall.https_compute_firewall | resource |
google_compute_firewall.rdp_compute_firewall | resource |
google_compute_firewall.ssh_compute_firewall | resource |
google_compute_network.compute_network | resource |
google_compute_router.vpc_compute_router | resource |
google_compute_router_nat.compute_router_nat | resource |
google_compute_subnetwork.compute_subnetwork | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
cidr_block | The IP address range of the VPC in CIDR notation. A prefix of /16 is recommended. Do not use a prefix higher than /27. | string |
"10.0.0.0/16" |
no |
cidr_subnetwork_spacing | How many subnetwork-mask sized spaces to leave between each subnetwork type. | number |
0 |
no |
cidr_subnetwork_width_delta | The difference between your network and subnetwork netmask; an /16 network and a /20 subnetwork would be 4. | number |
4 |
no |
cloud_nat_logging_filter | What filtering should be applied to logs for this NAT. Valid values are: 'ERRORS_ONLY', 'TRANSLATIONS_ONLY', 'ALL'. Defaults to 'ERRORS_ONLY'. | string |
"ERRORS_ONLY" |
no |
enable_cloud_nat | Whether to enable Cloud NAT. This can be used to allow private cluster nodes to accesss the internet. Defaults to 'true' | bool |
true |
no |
enable_cloud_nat_logging | Whether the NAT should export logs. Defaults to 'true'. | bool |
true |
no |
environment | Name of the environment where infrastructure being built. | string |
n/a | yes |
name | Name is the prefix to use for resources that needs to be created. | string |
n/a | yes |
project_id | The project in which to hold the components | string |
n/a | yes |
region | The region in which to create the VPC network | string |
n/a | yes |
secondary_cidr_block | The IP address range of the VPC's secondary address range in CIDR notation. A prefix of /16 is recommended. Do not use a prefix higher than /27. | string |
"10.1.0.0/16" |
no |
secondary_cidr_subnetwork_spacing | How many subnetwork-mask sized spaces to leave between each subnetwork type's secondary ranges. | number |
0 |
no |
secondary_cidr_subnetwork_width_delta | The difference between your network and subnetwork's secondary range netmask; an /16 network and a /20 subnetwork would be 4. | number |
4 |
no |
Name | Description |
---|---|
network_selflink | variable for the vpc network selflink |
subnetwork_selflink | variable for the subnetwork selflink |