Table: gcp_compute_instance_group_manager - Query Google Cloud Compute Engine Instance Group Managers using SQL
Google Cloud Compute Engine Instance Group Managers manage Managed Instance Groups (MIG), and are ideal for highly available applications that require a lot of computing power and need to scale rapidly to meet demand. They offer a range of features including autoscaling, autohealing, regional (multiple zone) deployment, and automatic updating.
Table Usage Guide
The gcp_compute_instance_group_manager
table provides insights into instance group managers within Google Cloud Compute Engine. As a system administrator, you can explore group-specific details through this table, including configuration, associated instances, and autoscaling policies. Utilize it to monitor the status of your instance groups, manage load balancing, and plan for capacity adjustments.
Examples
Basic Info
Discover the segments of your Google Cloud Platform (GCP) that contain instance group managers, gaining insights into aspects like size and location. This can help in project management and resource allocation within the GCP infrastructure.
select name, description, self_link, instance_group, location, akas, projectfrom gcp_compute_instance_group_manager;
select name, description, self_link, instance_group, location, akas, projectfrom gcp_compute_instance_group_manager;
Get instance group details of each instance group manager
Get the size of the instance groups managed by instance group managers.
select m.name, g.name as group_name, g.size as group_sizefrom gcp_compute_instance_group_manager as m, gcp_compute_instance_group as gwhere m.instance_group ->> 'name' = g.name;
select m.name, g.name as group_name, g.size as group_sizefrom gcp_compute_instance_group_manager as m, gcp_compute_instance_group as gwhere m.instance_group -> 'name' = g.name;
Schema for gcp_compute_instance_group_manager
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
akas | jsonb | Array of globally unique identifier strings (also known as) for the resource. | |
all_instances_config | jsonb | Specifies configuration that overrides the instance template configuration for the group. | |
auto_healing_policies | jsonb | The autohealing policy for this managed instance group. | |
base_instance_name | text | The base instance name is a prefix that you want to attach to the names of all VMs in a MIG. | |
creation_timestamp | timestamp with time zone | The timestamp when the instance group manager was created. | |
current_actions | jsonb | The list of instance actions and the number of instances in this managed instance group that are scheduled for each of those actions. | |
description | text | An optional description of this resource. Provide this property when you create the resource. | |
distribution_policy | jsonb | The Policy specifying the intended distribution of managed instances across zones in a regional managed instance group. | |
fingerprint | text | The fingerprint of the instance group manager. | |
id | bigint | The unique identifier for this instance group manager. This identifier is defined by the server. | |
instance_group | jsonb | The instance group that is managed by this group manager. | |
instance_lifecycle_policy | jsonb | The repair policy for this managed instance group. | |
instance_template | text | The URL of the instance template that is specified for this managed instance group. | |
kind | text | The type of the resource. Always compute#instanceGroupManager for instance group managers. | |
location | text | The GCP multi-region, region, or zone in which the resource is located. | |
name | text | = | The name of the instance group manager. |
named_ports | jsonb | The named ports configured for the Instance Groups complementary to this Instance Group Manager. | |
project | text | =, !=, ~~, ~~*, !~~, !~~* | The GCP Project in which the resource is located. |
region | text | The URL of the region where the instance group manager resides. Only applicable for regional resources. | |
region_name | text | The name of the region where the instance group manager resides. Only applicable for regional resources. | |
self_link | text | The server-defined fully-qualified URL for this resource. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
stateful_policy | jsonb | The stateful policy for this managed instance group. | |
status | jsonb | The status of this managed instance group. | |
target_pools | jsonb | The URLs for all TargetPool resources to which instances in the instanceGroup field are added. | |
target_size | bigint | The target number of running instances for this managed instance group. | |
title | text | Title of the resource. | |
update_policy | jsonb | The update policy for this managed instance group. | |
versions | jsonb | The versions of instance templates used by this managed instance group to create instances, useful for canary updates. Overrides the top-level instance template. | |
zone | text | The URL of the zone where the instance group manager resides. | |
zone_name | text | The zone name in which the instance group manager resides. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- gcp
You can pass the configuration to the command with the --config
argument:
steampipe_export_gcp --config '<your_config>' gcp_compute_instance_group_manager