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_rangefrom digitalocean_vpcwhere id = '411728c1-f29d-474c-bd9c-8c4f261c7904';
select id, name, ip_rangefrom digitalocean_vpcwhere 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_rangefrom digitalocean_vpcwhere 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_rangefrom digitalocean_vpcwhere is_default;
select id, name, ip_rangefrom digitalocean_vpcwhere is_default;
Query examples
- database_clusters_for_network_vpc
- droplet_droplets_for_network_vpc
- droplet_network_vpc_details
- kubernetes_cluster_network_vpc_details
- kubernetes_clusters_for_network_vpc
- network_firewalls_for_network_vpc
- network_load_balancers_for_network_vpc
- network_vpc_association
- network_vpc_by_region
- network_vpc_by_rfc1918_range
- network_vpc_count
- network_vpc_creation_month
- network_vpc_default_count
- network_vpc_input
- network_vpc_ip_range
- network_vpc_is_default
- network_vpc_overview
- network_vpc_tags
- network_vpcs_for_database_cluster
- network_vpcs_for_droplet
- network_vpcs_for_kubernetes_cluster
- network_vpcs_for_network_firewall
Schema for digitalocean_vpc
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. | |
akas | jsonb | Array of globally unique identifier strings (also known as) for the resource. | |
created_at | timestamp with time zone | A time value given in ISO8601 combined date and time format. | |
description | text | A free-form text field for describing the VPC's purpose. It may be a maximum of 255 characters. | |
id | text | = | A unique ID that can be used to identify and reference the VPC. |
ip_range | cidr | The range of IP addresses in the VPC in CIDR notation. | |
is_default | boolean | A 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. | |
name | text | The name of the VPC. Must be unique and may only contain alphanumeric characters, dashes, and periods. | |
region_slug | text | The slug identifier for the region where the VPC will be created. | |
tags | jsonb | A map of tags for the resource. | |
title | text | Title of the resource. | |
urn | text | The uniform resource name (URN) for the VPC. |