Skip to content

Commit

Permalink
fix(variables)!: allow optional attributes for update_policy object (#…
Browse files Browse the repository at this point in the history
…407)

Co-authored-by: Andrew Peabody <[email protected]>
  • Loading branch information
eeaton and apeabody authored May 23, 2024
1 parent d257c49 commit 6769c24
Show file tree
Hide file tree
Showing 11 changed files with 55 additions and 55 deletions.
16 changes: 8 additions & 8 deletions autogen/variables.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -118,16 +118,16 @@ variable "stateful_ips" {
variable "update_policy" {
description = "The rolling update policy. https://www.terraform.io/docs/providers/google/r/compute_region_instance_group_manager#rolling_update_policy"
type = list(object({
max_surge_fixed = number
instance_redistribution_type = string
max_surge_percent = number
max_unavailable_fixed = number
max_unavailable_percent = number
min_ready_sec = number
replacement_method = string
max_surge_fixed = optional(number)
instance_redistribution_type = optional(string)
max_surge_percent = optional(number)
max_unavailable_fixed = optional(number)
max_unavailable_percent = optional(number)
min_ready_sec = optional(number)
replacement_method = optional(string)
minimal_action = string
type = string
most_disruptive_allowed_action = string
most_disruptive_allowed_action = optional(string)
}))
default = []
}
Expand Down
2 changes: 1 addition & 1 deletion autogen/versions.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

terraform {
required_version = ">=0.13.0"
required_version = ">=1.3.0"
required_providers {
google = {
source = "hashicorp/google"
Expand Down
16 changes: 8 additions & 8 deletions examples/mig/full/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -169,16 +169,16 @@ variable "distribution_policy_zones" {
variable "update_policy" {
description = "The rolling update policy. https://www.terraform.io/docs/providers/google/r/compute_region_instance_group_manager#rolling_update_policy"
type = list(object({
max_surge_fixed = number
instance_redistribution_type = string
max_surge_percent = number
max_unavailable_fixed = number
max_unavailable_percent = number
min_ready_sec = number
replacement_method = string
max_surge_fixed = optional(number)
instance_redistribution_type = optional(string)
max_surge_percent = optional(number)
max_unavailable_fixed = optional(number)
max_unavailable_percent = optional(number)
min_ready_sec = optional(number)
replacement_method = optional(string)
minimal_action = string
type = string
most_disruptive_allowed_action = string
most_disruptive_allowed_action = optional(string)
}))
default = []
}
Expand Down
2 changes: 1 addition & 1 deletion modules/mig/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ The current version is 2.X. The following guides are available to assist with up
| stateful\_ips | Statful IPs created on the instances that will be preserved on instance delete. https://cloud.google.com/compute/docs/instance-groups/configuring-stateful-ip-addresses-in-migs | <pre>list(object({<br> interface_name = string<br> delete_rule = string<br> is_external = bool<br> }))</pre> | `[]` | no |
| target\_pools | The target load balancing pools to assign this group to. | `list(string)` | `[]` | no |
| target\_size | The target number of running instances for this managed instance group. This value should always be explicitly set unless this resource is attached to an autoscaler, in which case it should never be set. | `number` | `1` | no |
| update\_policy | The rolling update policy. https://www.terraform.io/docs/providers/google/r/compute_region_instance_group_manager#rolling_update_policy | <pre>list(object({<br> max_surge_fixed = number<br> instance_redistribution_type = string<br> max_surge_percent = number<br> max_unavailable_fixed = number<br> max_unavailable_percent = number<br> min_ready_sec = number<br> replacement_method = string<br> minimal_action = string<br> type = string<br> most_disruptive_allowed_action = string<br> }))</pre> | `[]` | no |
| update\_policy | The rolling update policy. https://www.terraform.io/docs/providers/google/r/compute_region_instance_group_manager#rolling_update_policy | <pre>list(object({<br> max_surge_fixed = optional(number)<br> instance_redistribution_type = optional(string)<br> max_surge_percent = optional(number)<br> max_unavailable_fixed = optional(number)<br> max_unavailable_percent = optional(number)<br> min_ready_sec = optional(number)<br> replacement_method = optional(string)<br> minimal_action = string<br> type = string<br> most_disruptive_allowed_action = optional(string)<br> }))</pre> | `[]` | no |
| wait\_for\_instances | Whether to wait for all instances to be created/updated before returning. Note that if this is set to true and the operation does not succeed, Terraform will continue trying until it times out. | `string` | `"false"` | no |

## Outputs
Expand Down
18 changes: 9 additions & 9 deletions modules/mig/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ spec:
version: 11.1.0
actuationTool:
flavor: Terraform
version: ">=0.13.0"
version: ">=1.3.0"
description: {}
content:
examples:
Expand Down Expand Up @@ -257,16 +257,16 @@ spec:
description: The rolling update policy. https://www.terraform.io/docs/providers/google/r/compute_region_instance_group_manager#rolling_update_policy
varType: |-
list(object({
max_surge_fixed = number
instance_redistribution_type = string
max_surge_percent = number
max_unavailable_fixed = number
max_unavailable_percent = number
min_ready_sec = number
replacement_method = string
max_surge_fixed = optional(number)
instance_redistribution_type = optional(string)
max_surge_percent = optional(number)
max_unavailable_fixed = optional(number)
max_unavailable_percent = optional(number)
min_ready_sec = optional(number)
replacement_method = optional(string)
minimal_action = string
type = string
most_disruptive_allowed_action = string
most_disruptive_allowed_action = optional(string)
}))
defaultValue: []
- name: wait_for_instances
Expand Down
16 changes: 8 additions & 8 deletions modules/mig/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -100,16 +100,16 @@ variable "stateful_ips" {
variable "update_policy" {
description = "The rolling update policy. https://www.terraform.io/docs/providers/google/r/compute_region_instance_group_manager#rolling_update_policy"
type = list(object({
max_surge_fixed = number
instance_redistribution_type = string
max_surge_percent = number
max_unavailable_fixed = number
max_unavailable_percent = number
min_ready_sec = number
replacement_method = string
max_surge_fixed = optional(number)
instance_redistribution_type = optional(string)
max_surge_percent = optional(number)
max_unavailable_fixed = optional(number)
max_unavailable_percent = optional(number)
min_ready_sec = optional(number)
replacement_method = optional(string)
minimal_action = string
type = string
most_disruptive_allowed_action = string
most_disruptive_allowed_action = optional(string)
}))
default = []
}
Expand Down
2 changes: 1 addition & 1 deletion modules/mig/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

terraform {
required_version = ">=0.13.0"
required_version = ">=1.3.0"
required_providers {
google = {
source = "hashicorp/google"
Expand Down
2 changes: 1 addition & 1 deletion modules/mig_with_percent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ The current version is 2.X. The following guides are available to assist with up
| stateful\_ips | Statful IPs created on the instances that will be preserved on instance delete. https://cloud.google.com/compute/docs/instance-groups/configuring-stateful-ip-addresses-in-migs | <pre>list(object({<br> interface_name = string<br> delete_rule = string<br> is_external = bool<br> }))</pre> | `[]` | no |
| target\_pools | The target load balancing pools to assign this group to. | `list(string)` | `[]` | no |
| target\_size | The target number of running instances for this managed instance group. This value should always be explicitly set unless this resource is attached to an autoscaler, in which case it should never be set. | `number` | `1` | no |
| update\_policy | The rolling update policy. https://www.terraform.io/docs/providers/google/r/compute_region_instance_group_manager#rolling_update_policy | <pre>list(object({<br> max_surge_fixed = number<br> instance_redistribution_type = string<br> max_surge_percent = number<br> max_unavailable_fixed = number<br> max_unavailable_percent = number<br> min_ready_sec = number<br> replacement_method = string<br> minimal_action = string<br> type = string<br> most_disruptive_allowed_action = string<br> }))</pre> | `[]` | no |
| update\_policy | The rolling update policy. https://www.terraform.io/docs/providers/google/r/compute_region_instance_group_manager#rolling_update_policy | <pre>list(object({<br> max_surge_fixed = optional(number)<br> instance_redistribution_type = optional(string)<br> max_surge_percent = optional(number)<br> max_unavailable_fixed = optional(number)<br> max_unavailable_percent = optional(number)<br> min_ready_sec = optional(number)<br> replacement_method = optional(string)<br> minimal_action = string<br> type = string<br> most_disruptive_allowed_action = optional(string)<br> }))</pre> | `[]` | no |
| wait\_for\_instances | Whether to wait for all instances to be created/updated before returning. Note that if this is set to true and the operation does not succeed, Terraform will continue trying until it times out. | `string` | `"false"` | no |

## Outputs
Expand Down
18 changes: 9 additions & 9 deletions modules/mig_with_percent/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ spec:
version: 11.1.0
actuationTool:
flavor: Terraform
version: ">=0.13.0"
version: ">=1.3.0"
description: {}
content:
examples:
Expand Down Expand Up @@ -265,16 +265,16 @@ spec:
description: The rolling update policy. https://www.terraform.io/docs/providers/google/r/compute_region_instance_group_manager#rolling_update_policy
varType: |-
list(object({
max_surge_fixed = number
instance_redistribution_type = string
max_surge_percent = number
max_unavailable_fixed = number
max_unavailable_percent = number
min_ready_sec = number
replacement_method = string
max_surge_fixed = optional(number)
instance_redistribution_type = optional(string)
max_surge_percent = optional(number)
max_unavailable_fixed = optional(number)
max_unavailable_percent = optional(number)
min_ready_sec = optional(number)
replacement_method = optional(string)
minimal_action = string
type = string
most_disruptive_allowed_action = string
most_disruptive_allowed_action = optional(string)
}))
defaultValue: []
- name: wait_for_instances
Expand Down
16 changes: 8 additions & 8 deletions modules/mig_with_percent/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,16 @@ variable "stateful_ips" {
variable "update_policy" {
description = "The rolling update policy. https://www.terraform.io/docs/providers/google/r/compute_region_instance_group_manager#rolling_update_policy"
type = list(object({
max_surge_fixed = number
instance_redistribution_type = string
max_surge_percent = number
max_unavailable_fixed = number
max_unavailable_percent = number
min_ready_sec = number
replacement_method = string
max_surge_fixed = optional(number)
instance_redistribution_type = optional(string)
max_surge_percent = optional(number)
max_unavailable_fixed = optional(number)
max_unavailable_percent = optional(number)
min_ready_sec = optional(number)
replacement_method = optional(string)
minimal_action = string
type = string
most_disruptive_allowed_action = string
most_disruptive_allowed_action = optional(string)
}))
default = []
}
Expand Down
2 changes: 1 addition & 1 deletion modules/mig_with_percent/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

terraform {
required_version = ">=0.13.0"
required_version = ">=1.3.0"
required_providers {
google = {
source = "hashicorp/google"
Expand Down

0 comments on commit 6769c24

Please sign in to comment.