Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ requestBody:
rules:
- type: ip_addr
value: "192.168.1.1"
description: "my home IP address"
- type: k8s
value: ff2a6c52-5a44-4b63-b99c-0e98e7a63d61
- type: droplet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@ description: >-
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](https://docs.digitalocean.com/products/networking/vpc/)
to limit access to them instead of using a firewall.

A successful
have access. The firewall is limited to 2000 IPs or CIDR addresses. Each rule can resolve to multiple IP addresses (type k8s, for example).
When possible, we recommend [placing your databases into a VPC network](https://docs.digitalocean.com/products/networking/vpc/)
to limit access to them instead of using a firewall. In addition, we recommend using CIDR addresses when possible instead of individual IPs,
as both types contribute the same amount to the 2000 limit.

tags:
- Databases
Expand All @@ -35,6 +33,7 @@ requestBody:
rules:
- type: ip_addr
value: '192.168.1.1'
description: 'my home IP address'
- type: k8s
value: ff2a6c52-5a44-4b63-b99c-0e98e7a63d61
- type: droplet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ source: |-
curl -X PUT \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
-d '{"rules": [{"type": "ip_addr","value": "192.168.1.1"},{"type": "droplet","value": "163973392"},{"type": "k8s","value": "ff2a6c52-5a44-4b63-b99c-0e98e7a63d61"},{"type": "tag","value": "backend"}]}' \
-d '{"rules": [{"type": "ip_addr","value": "192.168.1.1", "description": "my home IP address"},{"type": "droplet","value": "163973392"},{"type": "k8s","value": "ff2a6c52-5a44-4b63-b99c-0e98e7a63d61"},{"type": "tag","value": "backend"}]}' \
"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/firewall"
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ source: |-
{
Type: "ip_addr",
Value: "192.168.1.1",
Description: "my home IP address",
},
{
Type: "droplet",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ source: |-
"rules": [
{
"type": "ip_addr",
"value": "192.168.1.1"
"value": "192.168.1.1",
"description": "my home IP address"
},
{
"type": "k8s",
Expand Down
5 changes: 5 additions & 0 deletions specification/resources/databases/models/firewall_rule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ properties:
The ID of the specific resource, the name of a tag applied to a group of
resources, or the IP address that the firewall rule allows to access the
database cluster.
description:
type: string
example: my home address IP
description: >-
A label to describe the firewall rule.
created_at:
type: string
format: date-time
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ content:
cluster_uuid: 9cc10173-e9ea-4176-9dbc-a4cee4c4ff30
type: ip_addr
value: 192.168.1.1
description: 'my home IP address'
created_at: '2019-11-14T20:30:28Z'
- uuid: b9b42276-8295-4313-b40f-74173a7f46e6
cluster_uuid: 9cc10173-e9ea-4176-9dbc-a4cee4c4ff30
Expand Down