Skip to content

Commit 549a830

Browse files
attempt at fixing the (R)IGM.status output message (#10188) (#17595)
* attempt at fixing the (R)IGM.status output message * Fix plural of instances * Fix plural of instances * Fix plural of instances * Fix plural of instances [upstream:944450cac1644467f78fbcde4ed870ccbd07ba6f] Signed-off-by: Modular Magician <[email protected]>
1 parent 0e051af commit 549a830

5 files changed

+37
-7
lines changed

.changelog/10188.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
compute: added `status.all_instances_config.revision` field to `google_compute_instance_group_manager` and `google_compute_region_instance_group_manager`
3+
```

google/services/compute/resource_compute_instance_group_manager.go

+8-2
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,11 @@ func ResourceComputeInstanceGroupManager() *schema.Resource {
454454
Computed: true,
455455
Description: `A bit indicating whether this configuration has been applied to all managed instances in the group.`,
456456
},
457+
"current_revision": {
458+
Type: schema.TypeString,
459+
Computed: true,
460+
Description: `Current all-instances configuration revision. This value is in RFC3339 text format.`,
461+
},
457462
},
458463
},
459464
},
@@ -471,7 +476,7 @@ func ResourceComputeInstanceGroupManager() *schema.Resource {
471476
"per_instance_configs": {
472477
Type: schema.TypeList,
473478
Computed: true,
474-
Description: `Status of per-instance configs on the instance.`,
479+
Description: `Status of per-instance configs on the instances.`,
475480
Elem: &schema.Resource{
476481
Schema: map[string]*schema.Schema{
477482
"all_effective": {
@@ -1473,7 +1478,8 @@ func flattenStatusVersionTarget(versionTarget *compute.InstanceGroupManagerStatu
14731478
func flattenStatusAllInstancesConfig(allInstancesConfig *compute.InstanceGroupManagerStatusAllInstancesConfig) []map[string]interface{} {
14741479
results := []map[string]interface{}{}
14751480
data := map[string]interface{}{
1476-
"effective": allInstancesConfig.Effective,
1481+
"effective": allInstancesConfig.Effective,
1482+
"current_revision": allInstancesConfig.CurrentRevision,
14771483
}
14781484
results = append(results, data)
14791485
return results

google/services/compute/resource_compute_region_instance_group_manager.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,11 @@ func ResourceComputeRegionInstanceGroupManager() *schema.Resource {
481481
Computed: true,
482482
Description: `A bit indicating whether this configuration has been applied to all managed instances in the group.`,
483483
},
484+
"current_revision": {
485+
Type: schema.TypeString,
486+
Computed: true,
487+
Description: `Current all-instances configuration revision. This value is in RFC3339 text format.`,
488+
},
484489
},
485490
},
486491
},
@@ -498,7 +503,7 @@ func ResourceComputeRegionInstanceGroupManager() *schema.Resource {
498503
"per_instance_configs": {
499504
Type: schema.TypeList,
500505
Computed: true,
501-
Description: `Status of per-instance configs on the instance.`,
506+
Description: `Status of per-instance configs on the instances.`,
502507
Elem: &schema.Resource{
503508
Schema: map[string]*schema.Schema{
504509
"all_effective": {

website/docs/r/compute_instance_group_manager.html.markdown

+10-2
Original file line numberDiff line numberDiff line change
@@ -329,17 +329,25 @@ The `status` block holds:
329329

330330
* `version_target` - A status of consistency of Instances' versions with their target version specified by version field on Instance Group Manager.
331331

332+
* `all_instances_config` - Status of all-instances configuration on the group.
333+
334+
* `stateful` - Stateful status of the given Instance Group Manager.
335+
332336
The `version_target` block holds:
333337

334338
* `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.
335339

336-
* `stateful` - Stateful status of the given Instance Group Manager.
340+
The `all_instances_config` block holds:
341+
342+
* `effective` - A bit indicating whether this configuration has been applied to all managed instances in the group.
343+
344+
* `current_revision` - Current all-instances configuration revision. This value is in RFC3339 text format.
337345

338346
The `stateful` block holds:
339347

340348
* `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.
341349

342-
* `per_instance_configs` - Status of per-instance configs on the instance.
350+
* `per_instance_configs` - Status of per-instance configs on the instances.
343351

344352
The `per_instance_configs` block holds:
345353

website/docs/r/compute_region_instance_group_manager.html.markdown

+10-2
Original file line numberDiff line numberDiff line change
@@ -336,19 +336,27 @@ The `status` block holds:
336336

337337
* `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.
338338

339+
* `all_instances_config` - Status of all-instances configuration on the group.
340+
341+
* `stateful` - Stateful status of the given Instance Group Manager.
342+
339343
* `version_target` - A status of consistency of Instances' versions with their target version specified by version field on Instance Group Manager.
340344

341345
The `version_target` block holds:
342346

343347
* `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.
344348

345-
* `stateful` - Stateful status of the given Instance Group Manager.
349+
The `all_instances_config` block holds:
350+
351+
* `effective` - A bit indicating whether this configuration has been applied to all managed instances in the group.
352+
353+
* `current_revision` - Current all-instances configuration revision. This value is in RFC3339 text format.
346354

347355
The `stateful` block holds:
348356

349357
* `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.
350358

351-
* `per_instance_configs` - Status of per-instance configs on the instance.
359+
* `per_instance_configs` - Status of per-instance configs on the instances.
352360

353361
The `per_instance_configs` block holds:
354362

0 commit comments

Comments
 (0)