steampipe plugin install gcp

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,
project
from
gcp_compute_instance_group_manager;
select
name,
description,
self_link,
instance_group,
location,
akas,
project
from
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_size
from
gcp_compute_instance_group_manager as m,
gcp_compute_instance_group as g
where
m.instance_group ->> 'name' = g.name;
select
m.name,
g.name as group_name,
g.size as group_size
from
gcp_compute_instance_group_manager as m,
gcp_compute_instance_group as g
where
m.instance_group -> 'name' = g.name;

Schema for gcp_compute_instance_group_manager

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
akasjsonbArray of globally unique identifier strings (also known as) for the resource.
all_instances_configjsonbSpecifies configuration that overrides the instance template configuration for the group.
auto_healing_policiesjsonbThe autohealing policy for this managed instance group.
base_instance_nametextThe base instance name is a prefix that you want to attach to the names of all VMs in a MIG.
creation_timestamptimestamp with time zoneThe timestamp when the instance group manager was created.
current_actionsjsonbThe list of instance actions and the number of instances in this managed instance group that are scheduled for each of those actions.
descriptiontextAn optional description of this resource. Provide this property when you create the resource.
distribution_policyjsonbThe Policy specifying the intended distribution of managed instances across zones in a regional managed instance group.
fingerprinttextThe fingerprint of the instance group manager.
idbigintThe unique identifier for this instance group manager. This identifier is defined by the server.
instance_groupjsonbThe instance group that is managed by this group manager.
instance_lifecycle_policyjsonbThe repair policy for this managed instance group.
instance_templatetextThe URL of the instance template that is specified for this managed instance group.
kindtextThe type of the resource. Always compute#instanceGroupManager for instance group managers.
locationtextThe GCP multi-region, region, or zone in which the resource is located.
nametext=The name of the instance group manager.
named_portsjsonbThe named ports configured for the Instance Groups complementary to this Instance Group Manager.
projecttext=, !=, ~~, ~~*, !~~, !~~*The GCP Project in which the resource is located.
regiontextThe URL of the region where the instance group manager resides. Only applicable for regional resources.
region_nametextThe name of the region where the instance group manager resides. Only applicable for regional resources.
self_linktextThe server-defined fully-qualified URL for this resource.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
stateful_policyjsonbThe stateful policy for this managed instance group.
statusjsonbThe status of this managed instance group.
target_poolsjsonbThe URLs for all TargetPool resources to which instances in the instanceGroup field are added.
target_sizebigintThe target number of running instances for this managed instance group.
titletextTitle of the resource.
update_policyjsonbThe update policy for this managed instance group.
versionsjsonbThe versions of instance templates used by this managed instance group to create instances, useful for canary updates. Overrides the top-level instance template.
zonetextThe URL of the zone where the instance group manager resides.
zone_nametextThe 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