The Automation API is now available. No CLI. No human-in-the-loop. Just your code. Learn More

FirewallRule

Provides a Civo Cloud Firewall Rule resource. This can be used to create, modify, and delete Firewalls Rules. This resource don’t have an update option because the backend don’t have the support for that, so in this case we use ForceNew for all object in the resource.

Create a FirewallRule Resource

def FirewallRule(resource_name: str, opts: Optional[ResourceOptions] = None, cidrs: Optional[Sequence[str]] = None, direction: Optional[str] = None, end_port: Optional[str] = None, firewall_id: Optional[str] = None, label: Optional[str] = None, protocol: Optional[str] = None, start_port: Optional[str] = None)
func NewFirewallRule(ctx *Context, name string, args FirewallRuleArgs, opts ...ResourceOption) (*FirewallRule, error)
name string
The unique name of the resource.
args FirewallRuleArgs
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 FirewallRuleArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args FirewallRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

FirewallRule Resource Properties

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

Inputs

The FirewallRule resource accepts the following input properties:

Cidrs List<string>

the IP address of the other end (i.e. not your instance) to affect, or a valid network CIDR (defaults to being globally applied, i.e. 0.0.0.0/0).

Direction string

will this rule affect ingress traffic

EndPort string

The end port where traffic to be allowed.

FirewallId string

The Firewall id

Protocol string

This may be one of “tcp”, “udp”, or “icmp”.

StartPort string

The start port where traffic to be allowed.

Label string

a string that will be the displayed name/reference for this rule (optional)

Cidrs []string

the IP address of the other end (i.e. not your instance) to affect, or a valid network CIDR (defaults to being globally applied, i.e. 0.0.0.0/0).

Direction string

will this rule affect ingress traffic

EndPort string

The end port where traffic to be allowed.

FirewallId string

The Firewall id

Protocol string

This may be one of “tcp”, “udp”, or “icmp”.

StartPort string

The start port where traffic to be allowed.

Label string

a string that will be the displayed name/reference for this rule (optional)

cidrs string[]

the IP address of the other end (i.e. not your instance) to affect, or a valid network CIDR (defaults to being globally applied, i.e. 0.0.0.0/0).

direction string

will this rule affect ingress traffic

endPort string

The end port where traffic to be allowed.

firewallId string

The Firewall id

protocol string

This may be one of “tcp”, “udp”, or “icmp”.

startPort string

The start port where traffic to be allowed.

label string

a string that will be the displayed name/reference for this rule (optional)

cidrs Sequence[str]

the IP address of the other end (i.e. not your instance) to affect, or a valid network CIDR (defaults to being globally applied, i.e. 0.0.0.0/0).

direction str

will this rule affect ingress traffic

end_port str

The end port where traffic to be allowed.

firewall_id str

The Firewall id

protocol str

This may be one of “tcp”, “udp”, or “icmp”.

start_port str

The start port where traffic to be allowed.

label str

a string that will be the displayed name/reference for this rule (optional)

Outputs

All input properties are implicitly available as output properties. Additionally, the FirewallRule 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 FirewallRule Resource

Get an existing FirewallRule 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?: FirewallRuleState, opts?: CustomResourceOptions): FirewallRule
@staticmethod
def get(resource_name: str, id: str, opts: Optional[ResourceOptions] = None, cidrs: Optional[Sequence[str]] = None, direction: Optional[str] = None, end_port: Optional[str] = None, firewall_id: Optional[str] = None, label: Optional[str] = None, protocol: Optional[str] = None, start_port: Optional[str] = None) -> FirewallRule
func GetFirewallRule(ctx *Context, name string, id IDInput, state *FirewallRuleState, opts ...ResourceOption) (*FirewallRule, error)
public static FirewallRule Get(string name, Input<string> id, FirewallRuleState? 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:

Cidrs List<string>

the IP address of the other end (i.e. not your instance) to affect, or a valid network CIDR (defaults to being globally applied, i.e. 0.0.0.0/0).

Direction string

will this rule affect ingress traffic

EndPort string

The end port where traffic to be allowed.

FirewallId string

The Firewall id

Label string

a string that will be the displayed name/reference for this rule (optional)

Protocol string

This may be one of “tcp”, “udp”, or “icmp”.

StartPort string

The start port where traffic to be allowed.

Cidrs []string

the IP address of the other end (i.e. not your instance) to affect, or a valid network CIDR (defaults to being globally applied, i.e. 0.0.0.0/0).

Direction string

will this rule affect ingress traffic

EndPort string

The end port where traffic to be allowed.

FirewallId string

The Firewall id

Label string

a string that will be the displayed name/reference for this rule (optional)

Protocol string

This may be one of “tcp”, “udp”, or “icmp”.

StartPort string

The start port where traffic to be allowed.

cidrs string[]

the IP address of the other end (i.e. not your instance) to affect, or a valid network CIDR (defaults to being globally applied, i.e. 0.0.0.0/0).

direction string

will this rule affect ingress traffic

endPort string

The end port where traffic to be allowed.

firewallId string

The Firewall id

label string

a string that will be the displayed name/reference for this rule (optional)

protocol string

This may be one of “tcp”, “udp”, or “icmp”.

startPort string

The start port where traffic to be allowed.

cidrs Sequence[str]

the IP address of the other end (i.e. not your instance) to affect, or a valid network CIDR (defaults to being globally applied, i.e. 0.0.0.0/0).

direction str

will this rule affect ingress traffic

end_port str

The end port where traffic to be allowed.

firewall_id str

The Firewall id

label str

a string that will be the displayed name/reference for this rule (optional)

protocol str

This may be one of “tcp”, “udp”, or “icmp”.

start_port str

The start port where traffic to be allowed.

Package Details

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