https://github.com/thesis/terraform-google-vpc
Creates a regional VPC with two subnets: public and private.
https://github.com/thesis/terraform-google-vpc
google-cloud-platform terraform terraform-module vpc
Last synced: about 1 month ago
JSON representation
Creates a regional VPC with two subnets: public and private.
- Host: GitHub
- URL: https://github.com/thesis/terraform-google-vpc
- Owner: thesis
- License: mit
- Created: 2020-02-21T00:40:35.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-14T22:13:46.000Z (about 6 years ago)
- Last Synced: 2025-12-27T11:26:52.624Z (6 months ago)
- Topics: google-cloud-platform, terraform, terraform-module, vpc
- Language: HCL
- Homepage:
- Size: 17.6 KB
- Stars: 0
- Watchers: 29
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# GCP VPC Module
Creates a regional VPC with two subnets: public and private.
## Compatibility
This module is compatible with Terraform `<= 0.12.0`
And the Google Cloud Provider `<= 1.19.0`
## Usage
Module usage is as follows:
```hcl
module "your_custom_name_for_your_instance_of_this_module" {
source = "git@github.com:thesis/terraform-google-vpc.git"
vpc_network_name = "name-of-your-vpc-network"
project = "gcp-id-of-your-project"
region = "region-name"
routing_mode = "regional-or-global"
public_subnet_name = "name-of-your-public-subnet"
public_subnet_ip_cidr_range = "CIDR-range-for-public-subnet"
private_subnet_name = "name-of-your-private-subnet"
private_subnet_ip_cidr_range = "CIDR-range-for-private-subnet"
}
```
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|:----:|:-----:|:-----:|
| private\_subnet\_ip\_cidr\_range | The primary CIDR range for the private subnet. | string | `""` | no |
| private\_subnet\_name | The primary private subnet name. | string | `""` | no |
| project | The project id of the project you want to create the bucket in. | string | `""` | no |
| public\_subnet\_ip\_cidr\_range | The primary CIDR range for the public subnet. | string | `""` | no |
| public\_subnet\_name | The primary public subnet name. | string | `""` | no |
| region | The regions where resources are generated. | string | `""` | no |
| routing\_mode | Sets dynamic routing scope to global or regional. Must be regional or global. | string | `""` | no |
| vpc\_network\_name | The name of your vpc-network. | string | `""` | no |
| vpc\_subnet\_prefix | prefix naming for any subnet created via the module. | string | `"vpc-subnet"` | no |
## Outputs
| Name | Description |
|------|-------------|
| vpc\_network\_gateway\_ip | The ip of the gateway assigned to the vpc-network. |
| vpc\_network\_name | The name of your created vpc-network |
| vpc\_network\_self\_link | The URI of the created vpc-network resource. |
| vpc\_private\_subnet\_name | The name of your created private subnet. |
| vpc\_private\_subnet\_self\_link | The URI of the created private subnet resource. |
| vpc\_public\_subnet\_name | The name of your created public subnet. |
| vpc\_public\_subnet\_self\_link | The URI of the created public subnet resource. |
| vpc\_subnet\_prefix | prefix naming for any subnet created via the module. |
## License
See [LICENSE](./LICENSE).