DatabaseFirewall

Provides a DigitalOcean database firewall resource allowing you to restrict connections to your database to trusted sources. You may limit connections to specific Droplets, Kubernetes clusters, or IP addresses.

Create a DatabaseFirewall Resource

def DatabaseFirewall(resource_name, opts=None, cluster_id=None, rules=None, __props__=None);
name string
The unique name of the resource.
args DatabaseFirewallArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args DatabaseFirewallArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DatabaseFirewallArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

DatabaseFirewall Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The DatabaseFirewall resource accepts the following input properties:

ClusterId string

The ID of the target database cluster.

Rules List<Pulumi.DigitalOcean.Inputs.DatabaseFirewallRuleArgs>

A rule specifying a resource allowed to access the database cluster. The following arguments must be specified: - type - (Required) The type of resource that the firewall rule allows to access the database cluster. The possible values are: droplet, k8s, ip_addr, or tag. - value - (Required) 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.

ClusterId string

The ID of the target database cluster.

Rules []DatabaseFirewallRule

A rule specifying a resource allowed to access the database cluster. The following arguments must be specified: - type - (Required) The type of resource that the firewall rule allows to access the database cluster. The possible values are: droplet, k8s, ip_addr, or tag. - value - (Required) 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.

clusterId string

The ID of the target database cluster.

rules DatabaseFirewallRule[]

A rule specifying a resource allowed to access the database cluster. The following arguments must be specified: - type - (Required) The type of resource that the firewall rule allows to access the database cluster. The possible values are: droplet, k8s, ip_addr, or tag. - value - (Required) 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.

cluster_id str

The ID of the target database cluster.

rules List[DatabaseFirewallRule]

A rule specifying a resource allowed to access the database cluster. The following arguments must be specified: - type - (Required) The type of resource that the firewall rule allows to access the database cluster. The possible values are: droplet, k8s, ip_addr, or tag. - value - (Required) 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.

Outputs

All input properties are implicitly available as output properties. Additionally, the DatabaseFirewall resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing DatabaseFirewall Resource

Get an existing DatabaseFirewall resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: DatabaseFirewallState, opts?: CustomResourceOptions): DatabaseFirewall
static get(resource_name, id, opts=None, cluster_id=None, rules=None, __props__=None);
func GetDatabaseFirewall(ctx *Context, name string, id IDInput, state *DatabaseFirewallState, opts ...ResourceOption) (*DatabaseFirewall, error)
public static DatabaseFirewall Get(string name, Input<string> id, DatabaseFirewallState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

ClusterId string

The ID of the target database cluster.

Rules List<Pulumi.DigitalOcean.Inputs.DatabaseFirewallRuleArgs>

A rule specifying a resource allowed to access the database cluster. The following arguments must be specified: - type - (Required) The type of resource that the firewall rule allows to access the database cluster. The possible values are: droplet, k8s, ip_addr, or tag. - value - (Required) 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.

ClusterId string

The ID of the target database cluster.

Rules []DatabaseFirewallRule

A rule specifying a resource allowed to access the database cluster. The following arguments must be specified: - type - (Required) The type of resource that the firewall rule allows to access the database cluster. The possible values are: droplet, k8s, ip_addr, or tag. - value - (Required) 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.

clusterId string

The ID of the target database cluster.

rules DatabaseFirewallRule[]

A rule specifying a resource allowed to access the database cluster. The following arguments must be specified: - type - (Required) The type of resource that the firewall rule allows to access the database cluster. The possible values are: droplet, k8s, ip_addr, or tag. - value - (Required) 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.

cluster_id str

The ID of the target database cluster.

rules List[DatabaseFirewallRule]

A rule specifying a resource allowed to access the database cluster. The following arguments must be specified: - type - (Required) The type of resource that the firewall rule allows to access the database cluster. The possible values are: droplet, k8s, ip_addr, or tag. - value - (Required) 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.

Supporting Types

DatabaseFirewallRule

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Type string
Value string
CreatedAt string

The date and time when the firewall rule was created.

Uuid string

A unique identifier for the firewall rule.

Type string
Value string
CreatedAt string

The date and time when the firewall rule was created.

Uuid string

A unique identifier for the firewall rule.

type string
value string
createdAt string

The date and time when the firewall rule was created.

uuid string

A unique identifier for the firewall rule.

type str
value str
created_at str

The date and time when the firewall rule was created.

uuid str

A unique identifier for the firewall rule.

Package Details

Repository
https://github.com/pulumi/pulumi-digitalocean
License
Apache-2.0
Notes
This Pulumi package is based on the digitalocean Terraform Provider.