Skip to content

Commit

Permalink
fix: change stack_type for better upgrade compat (#293)
Browse files Browse the repository at this point in the history
  • Loading branch information
apeabody authored Feb 7, 2023
1 parent a587208 commit d15a307
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 10 deletions.
1 change: 0 additions & 1 deletion examples/instance_template/simple/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. | <pre>object({<br> email = string<br> scopes = set(string)<br> })</pre> | `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 |
Expand Down
2 changes: 1 addition & 1 deletion examples/instance_template/simple/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 0 additions & 5 deletions examples/instance_template/simple/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
2 changes: 1 addition & 1 deletion modules/instance_template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
4 changes: 2 additions & 2 deletions modules/instance_template/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down

0 comments on commit d15a307

Please sign in to comment.