turbot/gcp

steampipe plugin install gcpsteampipe plugin install gcp
gcp_audit_policygcp_bigquery_datasetgcp_bigquery_jobgcp_bigquery_tablegcp_bigtable_instancegcp_cloudfunctions_functiongcp_compute_addressgcp_compute_backend_bucketgcp_compute_backend_servicegcp_compute_diskgcp_compute_disk_metric_read_opsgcp_compute_disk_metric_read_ops_dailygcp_compute_disk_metric_read_ops_hourlygcp_compute_disk_metric_write_opsgcp_compute_disk_metric_write_ops_dailygcp_compute_disk_metric_write_ops_hourlygcp_compute_firewallgcp_compute_forwarding_rulegcp_compute_global_addressgcp_compute_global_forwarding_rulegcp_compute_imagegcp_compute_instancegcp_compute_instance_metric_cpu_utilizationgcp_compute_instance_metric_cpu_utilization_dailygcp_compute_instance_metric_cpu_utilization_hourlygcp_compute_instance_templategcp_compute_machine_typegcp_compute_networkgcp_compute_node_groupgcp_compute_node_templategcp_compute_project_metadatagcp_compute_regiongcp_compute_resource_policygcp_compute_routergcp_compute_snapshotgcp_compute_ssl_policygcp_compute_subnetworkgcp_compute_target_https_proxygcp_compute_target_poolgcp_compute_target_ssl_proxygcp_compute_target_vpn_gatewaygcp_compute_url_mapgcp_compute_vpn_tunnelgcp_compute_zonegcp_dns_managed_zonegcp_dns_policygcp_dns_record_setgcp_iam_policygcp_iam_rolegcp_kms_keygcp_kms_key_ringgcp_kubernetes_clustergcp_kubernetes_node_poolgcp_logging_bucketgcp_logging_exclusiongcp_logging_metricgcp_logging_sinkgcp_monitoring_alert_policygcp_monitoring_groupgcp_monitoring_notification_channelgcp_organizationgcp_projectgcp_project_organization_policygcp_project_servicegcp_pubsub_snapshotgcp_pubsub_subscriptiongcp_pubsub_topicgcp_service_accountgcp_service_account_keygcp_sql_backupgcp_sql_databasegcp_sql_database_instancegcp_sql_database_instance_metric_connectionsgcp_sql_database_instance_metric_connections_dailygcp_sql_database_instance_metric_connections_hourlygcp_sql_database_instance_metric_cpu_utilizationgcp_sql_database_instance_metric_cpu_utilization_dailygcp_sql_database_instance_metric_cpu_utilization_hourlygcp_storage_bucket

Table: gcp_compute_router

Cloud Router is a fully distributed and managed Google Cloud service that programs custom dynamic routes and scales with network traffic.

Examples

Cloud router basic info

select
name,
bgp_asn,
bgp_advertise_mode
from
gcp_compute_router;

NAT gateway info attached to router

select
name,
nat ->> 'name' as nat_name,
nat ->> 'enableEndpointIndependentMapping' as enable_endpoint_independent_mapping,
nat ->> 'natIpAllocateOption' as nat_ip_allocate_option,
nat ->> 'sourceSubnetworkIpRangesToNat' as source_subnetwork_ip_ranges_to_nat
from
gcp_compute_router,
jsonb_array_elements(nats) as nat;

List all routers with custom route advertisements

select
name,
bgp_asn,
bgp_advertise_mode,
bgp_advertised_ip_ranges
from
gcp_compute_router
where bgp_advertise_mode = 'CUSTOM';

.inspect gcp_compute_router

GCP Compute Router

NameTypeDescription
akasjsonbArray of globally unique identifier strings (also known as) for the resource.
bgp_advertise_modetextAn user-specified flag to indicate which mode to use for advertisement.
bgp_advertised_groupsjsonbAn user-specified list of prefix groups to advertise in custom mode.
bgp_advertised_ip_rangesjsonbUser-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups.
bgp_asnbigintSpecifies the local BGP Autonomous System Number (ASN).
bgp_peersjsonbBGP information that must be configured into the routing stack to establish BGP peering. This information must specify the peer ASN and either the interface name, IP address, or peer IP address.
creation_timestamptimestamp without time zoneThe creation timestamp of the resource.
descriptiontextA user-specified, human-readable description of the router.
idbigintThe unique identifier for the resource.
interfacesjsonbAn list of router interfaces.
kindtextThe type of the resource.
locationtextThe GCP multi-region, region, or zone in which the resource is located.
nametextA friendly name that identifies the resource.
natsjsonbA list of NAT services created in this router.
networktextThe URI of the network to which this router belongs.
projecttextThe GCP Project in which the resource is located.
self_linktextThe server-defined URL for the resource.
titletextTitle of the resource.