Class 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.
Inherited Members
Namespace: Pulumi.DigitalOcean
Assembly: Pulumi.DigitalOcean.dll
Syntax
public class DatabaseFirewall : CustomResource
Constructors
View SourceDatabaseFirewall(String, DatabaseFirewallArgs, CustomResourceOptions)
Create a DatabaseFirewall resource with the given unique name, arguments, and options.
Declaration
public DatabaseFirewall(string name, DatabaseFirewallArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| DatabaseFirewallArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceClusterId
The ID of the target database cluster.
Declaration
public Output<string> ClusterId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Rules
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, ortag.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.
Declaration
public Output<ImmutableArray<DatabaseFirewallRule>> Rules { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<DatabaseFirewallRule>> |
Methods
View SourceGet(String, Input<String>, DatabaseFirewallState, CustomResourceOptions)
Get an existing DatabaseFirewall resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static DatabaseFirewall Get(string name, Input<string> id, DatabaseFirewallState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| DatabaseFirewallState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| DatabaseFirewall |