From b512650ad2c327f75f296f67f44f146a0d8372da Mon Sep 17 00:00:00 2001 From: Arpit Sharma Date: Tue, 12 Sep 2023 21:58:09 +1000 Subject: [PATCH] =?UTF-8?q?fix(compute-mig):=20add=20correct=20type=20opti?= =?UTF-8?q?onality=20for=20metrics=20in=20autosca=E2=80=A6=20(#1668)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(compute-mig): add correct type optionality for metrics in autoscaler_config * feat(compute-mig): regenerate readme via tfdoc * fix(compute-mig): linting * fix(compute-mig): attempt #2 at fixing linting error * fix(compute-mig): tfdoc --no-files --- modules/compute-mig/README.md | 4 +--- modules/compute-mig/variables.tf | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/compute-mig/README.md b/modules/compute-mig/README.md index b281c2e3..5e3dbd8e 100644 --- a/modules/compute-mig/README.md +++ b/modules/compute-mig/README.md @@ -389,7 +389,6 @@ module "nginx-mig" { # tftest modules=2 resources=3 inventory=stateful.yaml ``` - ## Variables | name | description | type | required | default | @@ -400,7 +399,7 @@ module "nginx-mig" { | [project_id](variables.tf#L198) | Project id. | string | ✓ | | | [all_instances_config](variables.tf#L17) | Metadata and labels set to all instances in the group. | object({…}) | | null | | [auto_healing_policies](variables.tf#L26) | Auto-healing policies for this group. | object({…}) | | null | -| [autoscaler_config](variables.tf#L35) | Optional autoscaler configuration. | object({…}) | | null | +| [autoscaler_config](variables.tf#L35) | Optional autoscaler configuration. | object({…}) | | null | | [default_version_name](variables.tf#L83) | Name used for the default version. | string | | "default" | | [description](variables.tf#L89) | Optional description used for all resources managed by this module. | string | | "Terraform managed." | | [distribution_policy](variables.tf#L95) | DIstribution policy for regional MIG. | object({…}) | | null | @@ -422,5 +421,4 @@ module "nginx-mig" { | [group_manager](outputs.tf#L26) | Instance group resource. | | | [health_check](outputs.tf#L35) | Auto-created health-check resource. | | | [id](outputs.tf#L44) | Fully qualified group manager id. | | - diff --git a/modules/compute-mig/variables.tf b/modules/compute-mig/variables.tf index 30f2ce96..20864d18 100644 --- a/modules/compute-mig/variables.tf +++ b/modules/compute-mig/variables.tf @@ -61,8 +61,8 @@ variable "autoscaler_config" { })) metrics = optional(list(object({ name = string - type = string # GAUGE, DELTA_PER_SECOND, DELTA_PER_MINUTE - target_value = number + type = optional(string) # GAUGE, DELTA_PER_SECOND, DELTA_PER_MINUTE + target_value = optional(number) single_instance_assignment = optional(number) time_series_filter = optional(string) })))