Firewall
Provides a DigitalOcean Cloud Firewall resource. This can be used to create, modify, and delete Firewalls.
Create a Firewall Resource
new Firewall(name: string, args?: FirewallArgs, opts?: CustomResourceOptions);def Firewall(resource_name, opts=None, droplet_ids=None, inbound_rules=None, name=None, outbound_rules=None, tags=None, __props__=None);func NewFirewall(ctx *Context, name string, args *FirewallArgs, opts ...ResourceOption) (*Firewall, error)public Firewall(string name, FirewallArgs? args = null, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args FirewallArgs
- 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 FirewallArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FirewallArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
Firewall Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Firewall resource accepts the following input properties:
- Droplet
Ids List<int> The list of the IDs of the Droplets assigned to the Firewall.
- Inbound
Rules List<Pulumi.Digital Ocean. Inputs. Firewall Inbound Rule Args> The inbound access rule block for the Firewall. The
inbound_ruleblock is documented below.- Name string
The Firewall name
- Outbound
Rules List<Pulumi.Digital Ocean. Inputs. Firewall Outbound Rule Args> The outbound access rule block for the Firewall. The
outbound_ruleblock is documented below.- List<string>
The names of the Tags assigned to the Firewall.
- Droplet
Ids []int The list of the IDs of the Droplets assigned to the Firewall.
- Inbound
Rules []FirewallInbound Rule The inbound access rule block for the Firewall. The
inbound_ruleblock is documented below.- Name string
The Firewall name
- Outbound
Rules []FirewallOutbound Rule The outbound access rule block for the Firewall. The
outbound_ruleblock is documented below.- []string
The names of the Tags assigned to the Firewall.
- droplet
Ids number[] The list of the IDs of the Droplets assigned to the Firewall.
- inbound
Rules FirewallInbound Rule[] The inbound access rule block for the Firewall. The
inbound_ruleblock is documented below.- name string
The Firewall name
- outbound
Rules FirewallOutbound Rule[] The outbound access rule block for the Firewall. The
outbound_ruleblock is documented below.- string[]
The names of the Tags assigned to the Firewall.
- droplet_
ids List[Integer] The list of the IDs of the Droplets assigned to the Firewall.
- inbound_
rules List[FirewallInbound Rule] The inbound access rule block for the Firewall. The
inbound_ruleblock is documented below.- name str
The Firewall name
- outbound_
rules List[FirewallOutbound Rule] The outbound access rule block for the Firewall. The
outbound_ruleblock is documented below.- List[str]
The names of the Tags assigned to the Firewall.
Outputs
All input properties are implicitly available as output properties. Additionally, the Firewall resource produces the following output properties:
- Created
At string A time value given in ISO8601 combined date and time format that represents when the Firewall was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Pending
Changes List<Pulumi.Digital Ocean. Outputs. Firewall Pending Change> An list of object containing the fields, “droplet_id”, “removing”, and “status”. It is provided to detail exactly which Droplets are having their security policies updated. When empty, all changes have been successfully applied.
- Status string
A status string indicating the current state of the Firewall. This can be “waiting”, “succeeded”, or “failed”.
- Created
At string A time value given in ISO8601 combined date and time format that represents when the Firewall was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Pending
Changes []FirewallPending Change An list of object containing the fields, “droplet_id”, “removing”, and “status”. It is provided to detail exactly which Droplets are having their security policies updated. When empty, all changes have been successfully applied.
- Status string
A status string indicating the current state of the Firewall. This can be “waiting”, “succeeded”, or “failed”.
- created
At string A time value given in ISO8601 combined date and time format that represents when the Firewall was created.
- id string
- The provider-assigned unique ID for this managed resource.
- pending
Changes FirewallPending Change[] An list of object containing the fields, “droplet_id”, “removing”, and “status”. It is provided to detail exactly which Droplets are having their security policies updated. When empty, all changes have been successfully applied.
- status string
A status string indicating the current state of the Firewall. This can be “waiting”, “succeeded”, or “failed”.
- created_
at str A time value given in ISO8601 combined date and time format that represents when the Firewall was created.
- id str
- The provider-assigned unique ID for this managed resource.
- pending_
changes List[FirewallPending Change] An list of object containing the fields, “droplet_id”, “removing”, and “status”. It is provided to detail exactly which Droplets are having their security policies updated. When empty, all changes have been successfully applied.
- status str
A status string indicating the current state of the Firewall. This can be “waiting”, “succeeded”, or “failed”.
Look up an Existing Firewall Resource
Get an existing Firewall 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?: FirewallState, opts?: CustomResourceOptions): Firewallstatic get(resource_name, id, opts=None, created_at=None, droplet_ids=None, inbound_rules=None, name=None, outbound_rules=None, pending_changes=None, status=None, tags=None, __props__=None);func GetFirewall(ctx *Context, name string, id IDInput, state *FirewallState, opts ...ResourceOption) (*Firewall, error)public static Firewall Get(string name, Input<string> id, FirewallState? 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:
- Created
At string A time value given in ISO8601 combined date and time format that represents when the Firewall was created.
- Droplet
Ids List<int> The list of the IDs of the Droplets assigned to the Firewall.
- Inbound
Rules List<Pulumi.Digital Ocean. Inputs. Firewall Inbound Rule Args> The inbound access rule block for the Firewall. The
inbound_ruleblock is documented below.- Name string
The Firewall name
- Outbound
Rules List<Pulumi.Digital Ocean. Inputs. Firewall Outbound Rule Args> The outbound access rule block for the Firewall. The
outbound_ruleblock is documented below.- Pending
Changes List<Pulumi.Digital Ocean. Inputs. Firewall Pending Change Args> An list of object containing the fields, “droplet_id”, “removing”, and “status”. It is provided to detail exactly which Droplets are having their security policies updated. When empty, all changes have been successfully applied.
- Status string
A status string indicating the current state of the Firewall. This can be “waiting”, “succeeded”, or “failed”.
- List<string>
The names of the Tags assigned to the Firewall.
- Created
At string A time value given in ISO8601 combined date and time format that represents when the Firewall was created.
- Droplet
Ids []int The list of the IDs of the Droplets assigned to the Firewall.
- Inbound
Rules []FirewallInbound Rule The inbound access rule block for the Firewall. The
inbound_ruleblock is documented below.- Name string
The Firewall name
- Outbound
Rules []FirewallOutbound Rule The outbound access rule block for the Firewall. The
outbound_ruleblock is documented below.- Pending
Changes []FirewallPending Change An list of object containing the fields, “droplet_id”, “removing”, and “status”. It is provided to detail exactly which Droplets are having their security policies updated. When empty, all changes have been successfully applied.
- Status string
A status string indicating the current state of the Firewall. This can be “waiting”, “succeeded”, or “failed”.
- []string
The names of the Tags assigned to the Firewall.
- created
At string A time value given in ISO8601 combined date and time format that represents when the Firewall was created.
- droplet
Ids number[] The list of the IDs of the Droplets assigned to the Firewall.
- inbound
Rules FirewallInbound Rule[] The inbound access rule block for the Firewall. The
inbound_ruleblock is documented below.- name string
The Firewall name
- outbound
Rules FirewallOutbound Rule[] The outbound access rule block for the Firewall. The
outbound_ruleblock is documented below.- pending
Changes FirewallPending Change[] An list of object containing the fields, “droplet_id”, “removing”, and “status”. It is provided to detail exactly which Droplets are having their security policies updated. When empty, all changes have been successfully applied.
- status string
A status string indicating the current state of the Firewall. This can be “waiting”, “succeeded”, or “failed”.
- string[]
The names of the Tags assigned to the Firewall.
- created_
at str A time value given in ISO8601 combined date and time format that represents when the Firewall was created.
- droplet_
ids List[Integer] The list of the IDs of the Droplets assigned to the Firewall.
- inbound_
rules List[FirewallInbound Rule] The inbound access rule block for the Firewall. The
inbound_ruleblock is documented below.- name str
The Firewall name
- outbound_
rules List[FirewallOutbound Rule] The outbound access rule block for the Firewall. The
outbound_ruleblock is documented below.- pending_
changes List[FirewallPending Change] An list of object containing the fields, “droplet_id”, “removing”, and “status”. It is provided to detail exactly which Droplets are having their security policies updated. When empty, all changes have been successfully applied.
- status str
A status string indicating the current state of the Firewall. This can be “waiting”, “succeeded”, or “failed”.
- List[str]
The names of the Tags assigned to the Firewall.
Supporting Types
FirewallInboundRule
- Protocol string
The type of traffic to be allowed. This may be one of “tcp”, “udp”, or “icmp”.
- Port
Range string The ports on which traffic will be allowed specified as a string containing a single port, a range (e.g. “8000-9000”), or “1-65535” to open all ports for a protocol. Required for when protocol is
tcporudp.- Source
Addresses List<string> An array of strings containing the IPv4 addresses, IPv6 addresses, IPv4 CIDRs, and/or IPv6 CIDRs from which the inbound traffic will be accepted.
- Source
Droplet List<int>Ids An array containing the IDs of the Droplets from which the inbound traffic will be accepted.
- Source
Load List<string>Balancer Uids An array containing the IDs of the Load Balancers from which the inbound traffic will be accepted.
- List<string>
An array containing the names of Tags corresponding to groups of Droplets from which the inbound traffic will be accepted.
- Protocol string
The type of traffic to be allowed. This may be one of “tcp”, “udp”, or “icmp”.
- Port
Range string The ports on which traffic will be allowed specified as a string containing a single port, a range (e.g. “8000-9000”), or “1-65535” to open all ports for a protocol. Required for when protocol is
tcporudp.- Source
Addresses []string An array of strings containing the IPv4 addresses, IPv6 addresses, IPv4 CIDRs, and/or IPv6 CIDRs from which the inbound traffic will be accepted.
- Source
Droplet []intIds An array containing the IDs of the Droplets from which the inbound traffic will be accepted.
- Source
Load []stringBalancer Uids An array containing the IDs of the Load Balancers from which the inbound traffic will be accepted.
- []string
An array containing the names of Tags corresponding to groups of Droplets from which the inbound traffic will be accepted.
- protocol string
The type of traffic to be allowed. This may be one of “tcp”, “udp”, or “icmp”.
- port
Range string The ports on which traffic will be allowed specified as a string containing a single port, a range (e.g. “8000-9000”), or “1-65535” to open all ports for a protocol. Required for when protocol is
tcporudp.- source
Addresses string[] An array of strings containing the IPv4 addresses, IPv6 addresses, IPv4 CIDRs, and/or IPv6 CIDRs from which the inbound traffic will be accepted.
- source
Droplet number[]Ids An array containing the IDs of the Droplets from which the inbound traffic will be accepted.
- source
Load string[]Balancer Uids An array containing the IDs of the Load Balancers from which the inbound traffic will be accepted.
- string[]
An array containing the names of Tags corresponding to groups of Droplets from which the inbound traffic will be accepted.
- protocol str
The type of traffic to be allowed. This may be one of “tcp”, “udp”, or “icmp”.
- port
Range str The ports on which traffic will be allowed specified as a string containing a single port, a range (e.g. “8000-9000”), or “1-65535” to open all ports for a protocol. Required for when protocol is
tcporudp.- source
Addresses List[str] An array of strings containing the IPv4 addresses, IPv6 addresses, IPv4 CIDRs, and/or IPv6 CIDRs from which the inbound traffic will be accepted.
- source
Droplet List[Integer]Ids An array containing the IDs of the Droplets from which the inbound traffic will be accepted.
- source
Load List[str]Balancer Uids An array containing the IDs of the Load Balancers from which the inbound traffic will be accepted.
- List[str]
An array containing the names of Tags corresponding to groups of Droplets from which the inbound traffic will be accepted.
FirewallOutboundRule
- Protocol string
The type of traffic to be allowed. This may be one of “tcp”, “udp”, or “icmp”.
- Destination
Addresses List<string> An array of strings containing the IPv4 addresses, IPv6 addresses, IPv4 CIDRs, and/or IPv6 CIDRs to which the outbound traffic will be allowed.
- Destination
Droplet List<int>Ids An array containing the IDs of the Droplets to which the outbound traffic will be allowed.
- Destination
Load List<string>Balancer Uids An array containing the IDs of the Load Balancers to which the outbound traffic will be allowed.
- List<string>
An array containing the names of Tags corresponding to groups of Droplets to which the outbound traffic will be allowed. traffic.
- Port
Range string The ports on which traffic will be allowed specified as a string containing a single port, a range (e.g. “8000-9000”), or “1-65535” to open all ports for a protocol. Required for when protocol is
tcporudp.
- Protocol string
The type of traffic to be allowed. This may be one of “tcp”, “udp”, or “icmp”.
- Destination
Addresses []string An array of strings containing the IPv4 addresses, IPv6 addresses, IPv4 CIDRs, and/or IPv6 CIDRs to which the outbound traffic will be allowed.
- Destination
Droplet []intIds An array containing the IDs of the Droplets to which the outbound traffic will be allowed.
- Destination
Load []stringBalancer Uids An array containing the IDs of the Load Balancers to which the outbound traffic will be allowed.
- []string
An array containing the names of Tags corresponding to groups of Droplets to which the outbound traffic will be allowed. traffic.
- Port
Range string The ports on which traffic will be allowed specified as a string containing a single port, a range (e.g. “8000-9000”), or “1-65535” to open all ports for a protocol. Required for when protocol is
tcporudp.
- protocol string
The type of traffic to be allowed. This may be one of “tcp”, “udp”, or “icmp”.
- destination
Addresses string[] An array of strings containing the IPv4 addresses, IPv6 addresses, IPv4 CIDRs, and/or IPv6 CIDRs to which the outbound traffic will be allowed.
- destination
Droplet number[]Ids An array containing the IDs of the Droplets to which the outbound traffic will be allowed.
- destination
Load string[]Balancer Uids An array containing the IDs of the Load Balancers to which the outbound traffic will be allowed.
- string[]
An array containing the names of Tags corresponding to groups of Droplets to which the outbound traffic will be allowed. traffic.
- port
Range string The ports on which traffic will be allowed specified as a string containing a single port, a range (e.g. “8000-9000”), or “1-65535” to open all ports for a protocol. Required for when protocol is
tcporudp.
- protocol str
The type of traffic to be allowed. This may be one of “tcp”, “udp”, or “icmp”.
- destination
Addresses List[str] An array of strings containing the IPv4 addresses, IPv6 addresses, IPv4 CIDRs, and/or IPv6 CIDRs to which the outbound traffic will be allowed.
- destination
Droplet List[Integer]Ids An array containing the IDs of the Droplets to which the outbound traffic will be allowed.
- destination
Load List[str]Balancer Uids An array containing the IDs of the Load Balancers to which the outbound traffic will be allowed.
- List[str]
An array containing the names of Tags corresponding to groups of Droplets to which the outbound traffic will be allowed. traffic.
- port
Range str The ports on which traffic will be allowed specified as a string containing a single port, a range (e.g. “8000-9000”), or “1-65535” to open all ports for a protocol. Required for when protocol is
tcporudp.
FirewallPendingChange
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
Package Details
- Repository
- https://github.com/pulumi/pulumi-digitalocean
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
digitaloceanTerraform Provider.