Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

attempt at fixing the (R)IGM.status output message #17595

Merged
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
3 changes: 3 additions & 0 deletions .changelog/10188.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
compute: added `status.all_instances_config.revision` field to `google_compute_instance_group_manager` and `google_compute_region_instance_group_manager`
```
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,11 @@ func ResourceComputeInstanceGroupManager() *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.`,
},
},
},
},
Expand All @@ -471,7 +476,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": {
Expand Down Expand Up @@ -1473,7 +1478,8 @@ func flattenStatusVersionTarget(versionTarget *compute.InstanceGroupManagerStatu
func flattenStatusAllInstancesConfig(allInstancesConfig *compute.InstanceGroupManagerStatusAllInstancesConfig) []map[string]interface{} {
results := []map[string]interface{}{}
data := map[string]interface{}{
"effective": allInstancesConfig.Effective,
"effective": allInstancesConfig.Effective,
"current_revision": allInstancesConfig.CurrentRevision,
}
results = append(results, data)
return results
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,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.`,
},
},
},
},
Expand All @@ -498,7 +503,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": {
Expand Down
12 changes: 10 additions & 2 deletions website/docs/r/compute_instance_group_manager.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -329,17 +329,25 @@ 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:

* `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:

Expand Down
12 changes: 10 additions & 2 deletions website/docs/r/compute_region_instance_group_manager.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -336,19 +336,27 @@ 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:

* `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:

Expand Down
Loading