diff --git a/examples/instance_template/simple/README.md b/examples/instance_template/simple/README.md index d977957e..b3b3acb1 100644 --- a/examples/instance_template/simple/README.md +++ b/examples/instance_template/simple/README.md @@ -12,7 +12,6 @@ This is a simple, minimal example of how to use the instance_template module. | project\_id | The GCP project to use for integration tests | `string` | n/a | yes | | region | The GCP region to create and test resources in | `string` | `"us-central1"` | no | | service\_account | Service account to attach to the instance. See https://www.terraform.io/docs/providers/google/r/compute_instance_template#service_account. |
object({
email = string
scopes = set(string)
})
| `null` | no | -| stack\_type | The stack type for this network interface to identify whether the IPv6 feature is enabled or not. Values are IPV4\_IPV6 or IPV4\_ONLY. If not specified, IPV4\_ONLY will be used. | `string` | `"IPV4_ONLY"` | no | | subnetwork | The name of the subnetwork create this instance in. | `string` | `""` | no | | tags | Network tags, provided as a list | `list(string)` | n/a | yes | | threads\_per\_core | The number of threads per physical core. To disable simultaneous multithreading (SMT) set this to 1. | `string` | `null` | no | diff --git a/examples/instance_template/simple/main.tf b/examples/instance_template/simple/main.tf index d3db93f4..03a37377 100644 --- a/examples/instance_template/simple/main.tf +++ b/examples/instance_template/simple/main.tf @@ -35,7 +35,7 @@ module "instance_template" { source = "../../../modules/instance_template" project_id = var.project_id subnetwork = var.subnetwork - stack_type = var.stack_type + stack_type = "IPV4_ONLY" service_account = var.service_account name_prefix = "simple" tags = var.tags diff --git a/examples/instance_template/simple/variables.tf b/examples/instance_template/simple/variables.tf index f8e4ff2b..0301ccd5 100644 --- a/examples/instance_template/simple/variables.tf +++ b/examples/instance_template/simple/variables.tf @@ -32,11 +32,6 @@ variable "subnetwork" { default = "" } -variable "stack_type" { - description = "The stack type for this network interface to identify whether the IPv6 feature is enabled or not. Values are IPV4_IPV6 or IPV4_ONLY. If not specified, IPV4_ONLY will be used." - default = "IPV4_ONLY" -} - variable "service_account" { default = null type = object({ diff --git a/modules/instance_template/README.md b/modules/instance_template/README.md index 0ac1cb22..fbb6e0c9 100644 --- a/modules/instance_template/README.md +++ b/modules/instance_template/README.md @@ -45,7 +45,7 @@ See the [simple](../../examples/instance_template/simple) for a usage example. | source\_image | Source disk image. If neither source\_image nor source\_image\_family is specified, defaults to the latest public CentOS image. | `string` | `""` | no | | source\_image\_family | Source image family. If neither source\_image nor source\_image\_family is specified, defaults to the latest public CentOS image. | `string` | `"centos-7"` | no | | source\_image\_project | Project where the source image comes from. The default project contains CentOS images. | `string` | `"centos-cloud"` | no | -| stack\_type | The stack type for this network interface to identify whether the IPv6 feature is enabled or not. Values are IPV4\_IPV6 or IPV4\_ONLY. If not specified, IPV4\_ONLY will be used. | `string` | `"IPV4_ONLY"` | no | +| stack\_type | The stack type for this network interface to identify whether the IPv6 feature is enabled or not. Values are `IPV4_IPV6` or `IPV4_ONLY`. Default behavior is equivalent to IPV4\_ONLY. | `string` | `null` | no | | startup\_script | User startup script to run when instances spin up | `string` | `""` | no | | subnetwork | The name of the subnetwork to attach this interface to. The subnetwork must exist in the same region this instance will be created in. Either network or subnetwork must be provided. | `string` | `""` | no | | subnetwork\_project | The ID of the project in which the subnetwork belongs. If it is not provided, the provider project is used. | `string` | `""` | no | diff --git a/modules/instance_template/variables.tf b/modules/instance_template/variables.tf index c32a9a1c..c1072376 100644 --- a/modules/instance_template/variables.tf +++ b/modules/instance_template/variables.tf @@ -185,9 +185,9 @@ variable "network_ip" { } variable "stack_type" { - description = "The stack type for this network interface to identify whether the IPv6 feature is enabled or not. Values are IPV4_IPV6 or IPV4_ONLY. If not specified, IPV4_ONLY will be used." + description = "The stack type for this network interface to identify whether the IPv6 feature is enabled or not. Values are `IPV4_IPV6` or `IPV4_ONLY`. Default behavior is equivalent to IPV4_ONLY." type = string - default = "IPV4_ONLY" + default = null } variable "additional_networks" {