From 2e8f7681b05a064a2bc276e9254a55ad33568333 Mon Sep 17 00:00:00 2001 From: Adam Skubis Date: Mon, 11 Mar 2024 15:52:31 +0000 Subject: [PATCH 1/5] attempt at fixing the (R)IGM.status output message --- ...urce_compute_instance_group_manager.go.erb | 20 ++++++++++++------- ...mpute_region_instance_group_manager.go.erb | 5 +++++ ...mpute_instance_group_manager.html.markdown | 10 +++++++++- ...egion_instance_group_manager.html.markdown | 10 +++++++++- 4 files changed, 36 insertions(+), 9 deletions(-) diff --git a/mmv1/third_party/terraform/services/compute/resource_compute_instance_group_manager.go.erb b/mmv1/third_party/terraform/services/compute/resource_compute_instance_group_manager.go.erb index 97baae34251f..dffdb9510128 100644 --- a/mmv1/third_party/terraform/services/compute/resource_compute_instance_group_manager.go.erb +++ b/mmv1/third_party/terraform/services/compute/resource_compute_instance_group_manager.go.erb @@ -459,13 +459,18 @@ func ResourceComputeInstanceGroupManager() *schema.Resource { Computed: true, Description: `Status of all-instances configuration on the group.`, Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "effective": { - Type: schema.TypeBool, - Computed: true, - Description: `A bit indicating whether this configuration has been applied to all managed instances in the group.`, - }, - }, + Schema: map[string]*schema.Schema{ + "effective": { + Type: schema.TypeBool, + Computed: true, + Description: `A bit indicating whether this configuration has been applied to all managed instances in the group.`, + }, + "current_revision": { + Type: schema.TypeString, + Computed: true, + Description: `Current all-instances configuration revision. This value is in RFC3339 text format.`, + }, + }, }, }, "stateful": { @@ -1492,6 +1497,7 @@ func flattenStatusAllInstancesConfig(allInstancesConfig *compute.InstanceGroupMa results := []map[string]interface{}{} data := map[string]interface{}{ "effective": allInstancesConfig.Effective, + "current_revision": allInstancesConfig.CurrentRevision, } results = append(results, data) return results diff --git a/mmv1/third_party/terraform/services/compute/resource_compute_region_instance_group_manager.go.erb b/mmv1/third_party/terraform/services/compute/resource_compute_region_instance_group_manager.go.erb index 8c756656264c..eb453351e15f 100644 --- a/mmv1/third_party/terraform/services/compute/resource_compute_region_instance_group_manager.go.erb +++ b/mmv1/third_party/terraform/services/compute/resource_compute_region_instance_group_manager.go.erb @@ -492,6 +492,11 @@ func ResourceComputeRegionInstanceGroupManager() *schema.Resource { Computed: true, Description: `A bit indicating whether this configuration has been applied to all managed instances in the group.`, }, + "current_revision": { + Type: schema.TypeString, + Computed: true, + Description: `Current all-instances configuration revision. This value is in RFC3339 text format.`, + }, }, }, }, diff --git a/mmv1/third_party/terraform/website/docs/r/compute_instance_group_manager.html.markdown b/mmv1/third_party/terraform/website/docs/r/compute_instance_group_manager.html.markdown index 04f576cb43cf..f993843bba7e 100644 --- a/mmv1/third_party/terraform/website/docs/r/compute_instance_group_manager.html.markdown +++ b/mmv1/third_party/terraform/website/docs/r/compute_instance_group_manager.html.markdown @@ -329,11 +329,19 @@ The `status` block holds: * `version_target` - A status of consistency of Instances' versions with their target version specified by version field on Instance Group Manager. +* `all_instances_config` - Status of all-instances configuration on the group. + +* `stateful` - Stateful status of the given Instance Group Manager. + The `version_target` block holds: * `version_target` - A bit indicating whether version target has been reached in this managed instance group, i.e. all instances are in their target version. Instances' target version are specified by version field on Instance Group Manager. -* `stateful` - Stateful status of the given Instance Group Manager. +The `all_instances_config` block holds: + +* `effective` - A bit indicating whether this configuration has been applied to all managed instances in the group. + +* `current_revision` - Current all-instances configuration revision. This value is in RFC3339 text format. The `stateful` block holds: diff --git a/mmv1/third_party/terraform/website/docs/r/compute_region_instance_group_manager.html.markdown b/mmv1/third_party/terraform/website/docs/r/compute_region_instance_group_manager.html.markdown index eeab84344718..7e7b173c8e35 100644 --- a/mmv1/third_party/terraform/website/docs/r/compute_region_instance_group_manager.html.markdown +++ b/mmv1/third_party/terraform/website/docs/r/compute_region_instance_group_manager.html.markdown @@ -336,13 +336,21 @@ The `status` block holds: * `is_stable` - A bit indicating whether the managed instance group is in a stable state. A stable state means that: none of the instances in the managed instance group is currently undergoing any type of change (for example, creation, restart, or deletion); no future changes are scheduled for instances in the managed instance group; and the managed instance group itself is not being modified. +* `all_instances_config` - Status of all-instances configuration on the group. + +* `stateful` - Stateful status of the given Instance Group Manager. + * `version_target` - A status of consistency of Instances' versions with their target version specified by version field on Instance Group Manager. The `version_target` block holds: * `version_target` - A bit indicating whether version target has been reached in this managed instance group, i.e. all instances are in their target version. Instances' target version are specified by version field on Instance Group Manager. -* `stateful` - Stateful status of the given Instance Group Manager. +The `all_instances_config` block holds: + +* `effective` - A bit indicating whether this configuration has been applied to all managed instances in the group. + +* `current_revision` - Current all-instances configuration revision. This value is in RFC3339 text format. The `stateful` block holds: From 5efbef9c51c94cf73595895f798a56ee30fb061c Mon Sep 17 00:00:00 2001 From: askubis Date: Thu, 14 Mar 2024 11:17:08 +0100 Subject: [PATCH 2/5] Fix plural of instances --- .../compute/resource_compute_instance_group_manager.go.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmv1/third_party/terraform/services/compute/resource_compute_instance_group_manager.go.erb b/mmv1/third_party/terraform/services/compute/resource_compute_instance_group_manager.go.erb index dffdb9510128..7ee2ac2bbb18 100644 --- a/mmv1/third_party/terraform/services/compute/resource_compute_instance_group_manager.go.erb +++ b/mmv1/third_party/terraform/services/compute/resource_compute_instance_group_manager.go.erb @@ -487,7 +487,7 @@ func ResourceComputeInstanceGroupManager() *schema.Resource { "per_instance_configs": { Type: schema.TypeList, Computed: true, - Description: `Status of per-instance configs on the instance.`, + Description: `Status of per-instance configs on the instances.`, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "all_effective": { From 92796998b66e32d888e145c2abc045e8f9e35c30 Mon Sep 17 00:00:00 2001 From: askubis Date: Thu, 14 Mar 2024 11:17:42 +0100 Subject: [PATCH 3/5] Fix plural of instances --- .../resource_compute_region_instance_group_manager.go.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmv1/third_party/terraform/services/compute/resource_compute_region_instance_group_manager.go.erb b/mmv1/third_party/terraform/services/compute/resource_compute_region_instance_group_manager.go.erb index eb453351e15f..9a380f05eaf5 100644 --- a/mmv1/third_party/terraform/services/compute/resource_compute_region_instance_group_manager.go.erb +++ b/mmv1/third_party/terraform/services/compute/resource_compute_region_instance_group_manager.go.erb @@ -514,7 +514,7 @@ func ResourceComputeRegionInstanceGroupManager() *schema.Resource { "per_instance_configs": { Type: schema.TypeList, Computed: true, - Description: `Status of per-instance configs on the instance.`, + Description: `Status of per-instance configs on the instances.`, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "all_effective": { From a3aa10a0c025712fb5bd8acd54feefaa5c65360e Mon Sep 17 00:00:00 2001 From: askubis Date: Thu, 14 Mar 2024 11:18:10 +0100 Subject: [PATCH 4/5] Fix plural of instances --- .../website/docs/r/compute_instance_group_manager.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmv1/third_party/terraform/website/docs/r/compute_instance_group_manager.html.markdown b/mmv1/third_party/terraform/website/docs/r/compute_instance_group_manager.html.markdown index f993843bba7e..b76ff773958b 100644 --- a/mmv1/third_party/terraform/website/docs/r/compute_instance_group_manager.html.markdown +++ b/mmv1/third_party/terraform/website/docs/r/compute_instance_group_manager.html.markdown @@ -347,7 +347,7 @@ The `stateful` block holds: * `has_stateful_config` - A bit indicating whether the managed instance group has stateful configuration, that is, if you have configured any items in a stateful policy or in per-instance configs. The group might report that it has no stateful config even when there is still some preserved state on a managed instance, for example, if you have deleted all PICs but not yet applied those deletions. -* `per_instance_configs` - Status of per-instance configs on the instance. +* `per_instance_configs` - Status of per-instance configs on the instances. The `per_instance_configs` block holds: From dc469ddac2d29a79b483a2d1b3e544e9cbfd39d2 Mon Sep 17 00:00:00 2001 From: askubis Date: Thu, 14 Mar 2024 11:18:30 +0100 Subject: [PATCH 5/5] Fix plural of instances --- .../docs/r/compute_region_instance_group_manager.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmv1/third_party/terraform/website/docs/r/compute_region_instance_group_manager.html.markdown b/mmv1/third_party/terraform/website/docs/r/compute_region_instance_group_manager.html.markdown index 7e7b173c8e35..052747cdee7f 100644 --- a/mmv1/third_party/terraform/website/docs/r/compute_region_instance_group_manager.html.markdown +++ b/mmv1/third_party/terraform/website/docs/r/compute_region_instance_group_manager.html.markdown @@ -356,7 +356,7 @@ The `stateful` block holds: * `has_stateful_config` - A bit indicating whether the managed instance group has stateful configuration, that is, if you have configured any items in a stateful policy or in per-instance configs. The group might report that it has no stateful config even when there is still some preserved state on a managed instance, for example, if you have deleted all PICs but not yet applied those deletions. -* `per_instance_configs` - Status of per-instance configs on the instance. +* `per_instance_configs` - Status of per-instance configs on the instances. The `per_instance_configs` block holds: