turbot/digitalocean
steampipe plugin install digitalocean

Table: digitalocean_vpc - Query DigitalOcean Virtual Private Clouds using SQL

A DigitalOcean Virtual Private Cloud (VPC) is a private network interface for collections of DigitalOcean resources. VPCs can help to manage the network's resources where these resources are kept and provide a layer of isolation and security. They allow users to control their network settings and handle the traffic to their resources.

Table Usage Guide

The digitalocean_vpc table provides insights into the configuration and metadata of VPCs within DigitalOcean. As a network administrator, explore details about each VPC, including its IP range, region, and associated resources. Utilize it to uncover information about the network settings, manage the traffic to your resources, and maintain the isolation and security of your resources.

Examples

List all vpcs

Explore all the Virtual Private Clouds (VPCs) available in your DigitalOcean account to understand the network resources and services associated with each. This will aid in managing and optimizing your cloud infrastructure.

select
*
from
digitalocean_vpc;
select
*
from
digitalocean_vpc;

Get a VPC by ID

Discover the details of a specific Virtual Private Cloud (VPC) using its unique identifier. This can be useful when you need to understand the specific settings and configurations of a particular VPC within your DigitalOcean environment.

select
id,
name,
ip_range
from
digitalocean_vpc
where
id = '411728c1-f29d-474c-bd9c-8c4f261c7904';
select
id,
name,
ip_range
from
digitalocean_vpc
where
id = '411728c1-f29d-474c-bd9c-8c4f261c7904';

Find the VPC that contains an IP

Identify the specific Virtual Private Cloud (VPC) that includes a certain IP address. This is useful for pinpointing the location of a device or user within your network.

select
id,
name,
ip_range
from
digitalocean_vpc
where
ip_range >> '10.106.0.123';
Error: SQLite does not support CIDR operations.

Default VPCs

Explore which Virtual Private Clouds (VPCs) are set as default in your DigitalOcean account. This can help in managing network configurations and understand potential security implications.

select
id,
name,
ip_range
from
digitalocean_vpc
where
is_default;
select
id,
name,
ip_range
from
digitalocean_vpc
where
is_default;

Schema for digitalocean_vpc

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
akasjsonbArray of globally unique identifier strings (also known as) for the resource.
created_attimestamp with time zoneA time value given in ISO8601 combined date and time format.
descriptiontextA free-form text field for describing the VPC's purpose. It may be a maximum of 255 characters.
idtext=A unique ID that can be used to identify and reference the VPC.
ip_rangecidrThe range of IP addresses in the VPC in CIDR notation.
is_defaultbooleanA boolean value indicating whether or not the VPC is the default network for the region. All applicable resources are placed into the default VPC network unless otherwise specified during their creation. The `default` field cannot be unset from `true`. If you want to set a new default VPC network, update the `default` field of another VPC network in the same region. The previous network's `default` field will be set to `false` when a new default VPC has been defined.
nametextThe name of the VPC. Must be unique and may only contain alphanumeric characters, dashes, and periods.
region_slugtextThe slug identifier for the region where the VPC will be created.
tagsjsonbA map of tags for the resource.
titletextTitle of the resource.
urntextThe uniform resource name (URN) for the VPC.