diff --git a/README.md b/README.md index 7a06ed89..e88c858f 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,9 @@ Then perform the following commands on the root folder: | Name | Description | Type | Default | Required | |------|-------------|:----:|:-----:|:-----:| +| auto\_create\_subnetworks | 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 to false, the network is created in 'custom subnet mode' so the user can explicitly connect subnetwork resources. | string | `"false"` | no | | delete\_default\_internet\_gateway\_routes | If set, ensure that all routes within the network specified whose names begin with 'default-route' and with a next hop of 'default-internet-gateway' are deleted | string | `"false"` | no | +| description | An optional description of this resource. The resource must be recreated to modify this field. | string | `""` | no | | network\_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 | | routes | List of routes being created in this VPC | list(map(string)) | `` | no | diff --git a/main.tf b/main.tf index 05b3469a..3eb07983 100644 --- a/main.tf +++ b/main.tf @@ -19,9 +19,10 @@ *****************************************/ resource "google_compute_network" "network" { name = var.network_name - auto_create_subnetworks = "false" + auto_create_subnetworks = var.auto_create_subnetworks routing_mode = var.routing_mode project = var.project_id + description = var.description } /****************************************** diff --git a/variables.tf b/variables.tf index 5f76f164..5e9215ab 100644 --- a/variables.tf +++ b/variables.tf @@ -54,3 +54,16 @@ variable "delete_default_internet_gateway_routes" { description = "If set, ensure that all routes within the network specified whose names begin with 'default-route' and with a next hop of 'default-internet-gateway' are deleted" default = "false" } + + +variable "description" { + type = string + description = "An optional description of this resource. The resource must be recreated to modify this field." + default = "" +} + +variable "auto_create_subnetworks" { + type = bool + description = "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 to false, the network is created in 'custom subnet mode' so the user can explicitly connect subnetwork resources." + default = false +}