Skip to main content

firewalls

Creates, updates, deletes, gets or lists a firewalls resource.

Overview

Namefirewalls
TypeResource
Iddigitalocean.databases.firewalls

Fields

NameDatatypeDescription
column_anon``

Methods

NameAccessible byRequired ParamsDescription
databases_list_firewall_rulesSELECTdatabase_cluster_uuidTo list all of a database cluster's firewall rules (known as "trusted sources" in the control panel), send a GET request to /v2/databases/$DATABASE_ID/firewall. The result will be a JSON object with a rules key.
databases_update_firewall_rulesEXECdatabase_cluster_uuidTo update a database cluster's firewall rules (known as "trusted sources" in the control panel), send a PUT request to /v2/databases/$DATABASE_ID/firewall specifying which resources should be able to open connections to the database. You may limit connections to specific Droplets, Kubernetes clusters, or IP addresses. When a tag is provided, any Droplet or Kubernetes node with that tag applied to it will have access. The firewall is limited to 100 rules (or trusted sources). When possible, we recommend placing your databases into a VPC network to limit access to them instead of using a firewall. A successful

SELECT examples

To list all of a database cluster's firewall rules (known as "trusted sources" in the control panel), send a GET request to /v2/databases/$DATABASE_ID/firewall. The result will be a JSON object with a rules key.

SELECT
column_anon
FROM digitalocean.databases.firewalls
WHERE database_cluster_uuid = '{{ database_cluster_uuid }}';