Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions autogen/main.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ resource "google_compute_region_autoscaler" "autoscaler" {
name = lookup(metric.value, "name", null)
target = lookup(metric.value, "target", null)
type = lookup(metric.value, "type", null)
filter = lookup(metric.value, "filter", null)
}
}
dynamic "load_balancing_utilization" {
Expand Down
2 changes: 1 addition & 1 deletion modules/mig/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The current version is 2.X. The following guides are available to assist with up
| autoscaling\_cpu | Autoscaling, cpu utilization policy block as single element array. https://www.terraform.io/docs/providers/google/r/compute_autoscaler#cpu_utilization | <pre>list(object({<br> target = number<br> predictive_method = string<br> }))</pre> | `[]` | no |
| autoscaling\_enabled | Creates an autoscaler for the managed instance group | `string` | `"false"` | no |
| autoscaling\_lb | Autoscaling, load balancing utilization policy block as single element array. https://www.terraform.io/docs/providers/google/r/compute_autoscaler#load_balancing_utilization | `list(map(number))` | `[]` | no |
| autoscaling\_metric | Autoscaling, metric policy block as single element array. https://www.terraform.io/docs/providers/google/r/compute_autoscaler#metric | <pre>list(object({<br> name = string<br> target = number<br> type = string<br> }))</pre> | `[]` | no |
| autoscaling\_metric | Autoscaling, metric policy block as single element array. https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_region_autoscaler#metric-1 | <pre>list(object({<br> name = string<br> target = number<br> type = string<br> filter = optional(string)<br> }))</pre> | `[]` | no |
| autoscaling\_mode | Operating mode of the autoscaling policy. If omitted, the default value is ON. https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_autoscaler#mode | `string` | `null` | no |
| autoscaling\_scale\_in\_control | Autoscaling, scale-in control block. https://www.terraform.io/docs/providers/google/r/compute_autoscaler#scale_in_control | <pre>object({<br> fixed_replicas = number<br> percent_replicas = number<br> time_window_sec = number<br> })</pre> | <pre>{<br> "fixed_replicas": null,<br> "percent_replicas": null,<br> "time_window_sec": null<br>}</pre> | no |
| cooldown\_period | The number of seconds that the autoscaler should wait before it starts collecting information from a new instance. | `number` | `60` | no |
Expand Down
1 change: 1 addition & 0 deletions modules/mig/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ resource "google_compute_region_autoscaler" "autoscaler" {
name = lookup(metric.value, "name", null)
target = lookup(metric.value, "target", null)
type = lookup(metric.value, "type", null)
filter = lookup(metric.value, "filter", null)
}
}
dynamic "load_balancing_utilization" {
Expand Down
3 changes: 2 additions & 1 deletion modules/mig/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,13 @@ spec:
}))
defaultValue: []
- name: autoscaling_metric
description: Autoscaling, metric policy block as single element array. https://www.terraform.io/docs/providers/google/r/compute_autoscaler#metric
description: Autoscaling, metric policy block as single element array. https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_region_autoscaler#metric-1
varType: |-
list(object({
name = string
target = number
type = string
filter = optional(string)
}))
defaultValue: []
- name: autoscaling_lb
Expand Down
3 changes: 2 additions & 1 deletion modules/mig/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,12 @@ variable "autoscaling_cpu" {
}

variable "autoscaling_metric" {
description = "Autoscaling, metric policy block as single element array. https://www.terraform.io/docs/providers/google/r/compute_autoscaler#metric"
description = "Autoscaling, metric policy block as single element array. https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_region_autoscaler#metric-1"
type = list(object({
name = string
target = number
type = string
filter = optional(string)
}))
default = []
}
Expand Down