1. Packages
  2. DanubeData
  3. API Docs
  4. Firewall
DanubeData v0.1.7 published on Sunday, Feb 1, 2026 by AdrianSilaghi
danubedata logo
DanubeData v0.1.7 published on Sunday, Feb 1, 2026 by AdrianSilaghi

    # danubedata.Firewall

    Manages a firewall with rules for network traffic control.

    Example Usage

    Basic Firewall

    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.danubedata.Firewall;
    import com.pulumi.danubedata.FirewallArgs;
    import com.pulumi.danubedata.inputs.FirewallRuleArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var web = new Firewall("web", FirewallArgs.builder()
                .defaultAction("deny")
                .description("Allow HTTP/HTTPS and SSH")
                .rules(            
                    FirewallRuleArgs.builder()
                        .action("allow")
                        .direction("inbound")
                        .name("Allow SSH")
                        .port_range_end(22)
                        .port_range_start(22)
                        .priority(100)
                        .protocol("tcp")
                        .source_ips("0.0.0.0/0")
                        .build(),
                    FirewallRuleArgs.builder()
                        .action("allow")
                        .direction("inbound")
                        .name("Allow HTTP")
                        .port_range_end(80)
                        .port_range_start(80)
                        .priority(200)
                        .protocol("tcp")
                        .source_ips("0.0.0.0/0")
                        .build(),
                    FirewallRuleArgs.builder()
                        .action("allow")
                        .direction("inbound")
                        .name("Allow HTTPS")
                        .port_range_end(443)
                        .port_range_start(443)
                        .priority(300)
                        .protocol("tcp")
                        .source_ips("0.0.0.0/0")
                        .build())
                .build());
    
        }
    }
    
    resources:
      web:
        type: danubedata:Firewall
        properties:
          defaultAction: deny
          description: Allow HTTP/HTTPS and SSH
          rules:
            - action: allow
              direction: inbound
              name: Allow SSH
              port_range_end: 22
              port_range_start: 22
              priority: 100
              protocol: tcp
              source_ips:
                - 0.0.0.0/0
            - action: allow
              direction: inbound
              name: Allow HTTP
              port_range_end: 80
              port_range_start: 80
              priority: 200
              protocol: tcp
              source_ips:
                - 0.0.0.0/0
            - action: allow
              direction: inbound
              name: Allow HTTPS
              port_range_end: 443
              port_range_start: 443
              priority: 300
              protocol: tcp
              source_ips:
                - 0.0.0.0/0
    

    Firewall with IP Restrictions

    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.danubedata.Firewall;
    import com.pulumi.danubedata.FirewallArgs;
    import com.pulumi.danubedata.inputs.FirewallRuleArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var admin = new Firewall("admin", FirewallArgs.builder()
                .defaultAction("deny")
                .description("Restricted admin access")
                .rules(            
                    FirewallRuleArgs.builder()
                        .action("allow")
                        .direction("inbound")
                        .name("Allow SSH from office")
                        .port_range_end(22)
                        .port_range_start(22)
                        .priority(100)
                        .protocol("tcp")
                        .source_ips(                    
                            "203.0.113.0/24",
                            "198.51.100.0/24")
                        .build(),
                    FirewallRuleArgs.builder()
                        .action("allow")
                        .direction("outbound")
                        .name("Allow all outbound")
                        .priority(1000)
                        .protocol("all")
                        .source_ips("0.0.0.0/0")
                        .build())
                .build());
    
        }
    }
    
    resources:
      admin:
        type: danubedata:Firewall
        properties:
          defaultAction: deny
          description: Restricted admin access
          rules:
            - action: allow
              direction: inbound
              name: Allow SSH from office
              port_range_end: 22
              port_range_start: 22
              priority: 100
              protocol: tcp
              source_ips:
                - 203.0.113.0/24
                - 198.51.100.0/24
            - action: allow
              direction: outbound
              name: Allow all outbound
              priority: 1000
              protocol: all
              source_ips:
                - 0.0.0.0/0
    

    Create Firewall Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Firewall(name: string, args?: FirewallArgs, opts?: CustomResourceOptions);
    @overload
    def Firewall(resource_name: str,
                 args: Optional[FirewallArgs] = None,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def Firewall(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 default_action: Optional[str] = None,
                 description: Optional[str] = None,
                 is_default: Optional[bool] = None,
                 name: Optional[str] = None,
                 rules: Optional[Sequence[FirewallRuleArgs]] = None)
    func NewFirewall(ctx *Context, name string, args *FirewallArgs, opts ...ResourceOption) (*Firewall, error)
    public Firewall(string name, FirewallArgs? args = null, CustomResourceOptions? opts = null)
    public Firewall(String name, FirewallArgs args)
    public Firewall(String name, FirewallArgs args, CustomResourceOptions options)
    
    type: danubedata:Firewall
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    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.
    args FirewallArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control 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.
    name String
    The unique name of the resource.
    args FirewallArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var firewallResource = new DanubeData.Firewall("firewallResource", new()
    {
        DefaultAction = "string",
        Description = "string",
        IsDefault = false,
        Name = "string",
        Rules = new[]
        {
            new DanubeData.Inputs.FirewallRuleArgs
            {
                Action = "string",
                Direction = "string",
                Protocol = "string",
                Id = "string",
                Name = "string",
                PortRangeEnd = 0,
                PortRangeStart = 0,
                Priority = 0,
                SourceIps = new[]
                {
                    "string",
                },
            },
        },
    });
    
    example, err := danubedata.NewFirewall(ctx, "firewallResource", &danubedata.FirewallArgs{
    	DefaultAction: pulumi.String("string"),
    	Description:   pulumi.String("string"),
    	IsDefault:     pulumi.Bool(false),
    	Name:          pulumi.String("string"),
    	Rules: danubedata.FirewallRuleArray{
    		&danubedata.FirewallRuleArgs{
    			Action:         pulumi.String("string"),
    			Direction:      pulumi.String("string"),
    			Protocol:       pulumi.String("string"),
    			Id:             pulumi.String("string"),
    			Name:           pulumi.String("string"),
    			PortRangeEnd:   pulumi.Int(0),
    			PortRangeStart: pulumi.Int(0),
    			Priority:       pulumi.Int(0),
    			SourceIps: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    		},
    	},
    })
    
    var firewallResource = new Firewall("firewallResource", FirewallArgs.builder()
        .defaultAction("string")
        .description("string")
        .isDefault(false)
        .name("string")
        .rules(FirewallRuleArgs.builder()
            .action("string")
            .direction("string")
            .protocol("string")
            .id("string")
            .name("string")
            .portRangeEnd(0)
            .portRangeStart(0)
            .priority(0)
            .sourceIps("string")
            .build())
        .build());
    
    firewall_resource = danubedata.Firewall("firewallResource",
        default_action="string",
        description="string",
        is_default=False,
        name="string",
        rules=[{
            "action": "string",
            "direction": "string",
            "protocol": "string",
            "id": "string",
            "name": "string",
            "port_range_end": 0,
            "port_range_start": 0,
            "priority": 0,
            "source_ips": ["string"],
        }])
    
    const firewallResource = new danubedata.Firewall("firewallResource", {
        defaultAction: "string",
        description: "string",
        isDefault: false,
        name: "string",
        rules: [{
            action: "string",
            direction: "string",
            protocol: "string",
            id: "string",
            name: "string",
            portRangeEnd: 0,
            portRangeStart: 0,
            priority: 0,
            sourceIps: ["string"],
        }],
    });
    
    type: danubedata:Firewall
    properties:
        defaultAction: string
        description: string
        isDefault: false
        name: string
        rules:
            - action: string
              direction: string
              id: string
              name: string
              portRangeEnd: 0
              portRangeStart: 0
              priority: 0
              protocol: string
              sourceIps:
                - string
    

    Firewall Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Firewall resource accepts the following input properties:

    DefaultAction string
    Default action for traffic not matching any rule: 'drop' or 'accept'.
    Description string
    Description of the firewall.
    IsDefault bool
    Whether this is the default firewall for the team.
    Name string
    Name of the firewall.
    Rules List<DanubeData.DanubeData.Inputs.FirewallRule>
    List of firewall rules.
    DefaultAction string
    Default action for traffic not matching any rule: 'drop' or 'accept'.
    Description string
    Description of the firewall.
    IsDefault bool
    Whether this is the default firewall for the team.
    Name string
    Name of the firewall.
    Rules []FirewallRuleArgs
    List of firewall rules.
    defaultAction String
    Default action for traffic not matching any rule: 'drop' or 'accept'.
    description String
    Description of the firewall.
    isDefault Boolean
    Whether this is the default firewall for the team.
    name String
    Name of the firewall.
    rules List<FirewallRule>
    List of firewall rules.
    defaultAction string
    Default action for traffic not matching any rule: 'drop' or 'accept'.
    description string
    Description of the firewall.
    isDefault boolean
    Whether this is the default firewall for the team.
    name string
    Name of the firewall.
    rules FirewallRule[]
    List of firewall rules.
    default_action str
    Default action for traffic not matching any rule: 'drop' or 'accept'.
    description str
    Description of the firewall.
    is_default bool
    Whether this is the default firewall for the team.
    name str
    Name of the firewall.
    rules Sequence[FirewallRuleArgs]
    List of firewall rules.
    defaultAction String
    Default action for traffic not matching any rule: 'drop' or 'accept'.
    description String
    Description of the firewall.
    isDefault Boolean
    Whether this is the default firewall for the team.
    name String
    Name of the firewall.
    rules List<Property Map>
    List of firewall rules.

    Outputs

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

    CreatedAt string
    Creation timestamp.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    Current status of the firewall.
    UpdatedAt string
    Timestamp when the firewall was last updated.
    CreatedAt string
    Creation timestamp.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    Current status of the firewall.
    UpdatedAt string
    Timestamp when the firewall was last updated.
    createdAt String
    Creation timestamp.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    Current status of the firewall.
    updatedAt String
    Timestamp when the firewall was last updated.
    createdAt string
    Creation timestamp.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    Current status of the firewall.
    updatedAt string
    Timestamp when the firewall was last updated.
    created_at str
    Creation timestamp.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    Current status of the firewall.
    updated_at str
    Timestamp when the firewall was last updated.
    createdAt String
    Creation timestamp.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    Current status of the firewall.
    updatedAt String
    Timestamp when the firewall was last updated.

    Look up 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): Firewall
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created_at: Optional[str] = None,
            default_action: Optional[str] = None,
            description: Optional[str] = None,
            is_default: Optional[bool] = None,
            name: Optional[str] = None,
            rules: Optional[Sequence[FirewallRuleArgs]] = None,
            status: Optional[str] = None,
            updated_at: Optional[str] = None) -> Firewall
    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)
    public static Firewall get(String name, Output<String> id, FirewallState state, CustomResourceOptions options)
    resources:  _:    type: danubedata:Firewall    get:      id: ${id}
    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.
    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:
    CreatedAt string
    Creation timestamp.
    DefaultAction string
    Default action for traffic not matching any rule: 'drop' or 'accept'.
    Description string
    Description of the firewall.
    IsDefault bool
    Whether this is the default firewall for the team.
    Name string
    Name of the firewall.
    Rules List<DanubeData.DanubeData.Inputs.FirewallRule>
    List of firewall rules.
    Status string
    Current status of the firewall.
    UpdatedAt string
    Timestamp when the firewall was last updated.
    CreatedAt string
    Creation timestamp.
    DefaultAction string
    Default action for traffic not matching any rule: 'drop' or 'accept'.
    Description string
    Description of the firewall.
    IsDefault bool
    Whether this is the default firewall for the team.
    Name string
    Name of the firewall.
    Rules []FirewallRuleArgs
    List of firewall rules.
    Status string
    Current status of the firewall.
    UpdatedAt string
    Timestamp when the firewall was last updated.
    createdAt String
    Creation timestamp.
    defaultAction String
    Default action for traffic not matching any rule: 'drop' or 'accept'.
    description String
    Description of the firewall.
    isDefault Boolean
    Whether this is the default firewall for the team.
    name String
    Name of the firewall.
    rules List<FirewallRule>
    List of firewall rules.
    status String
    Current status of the firewall.
    updatedAt String
    Timestamp when the firewall was last updated.
    createdAt string
    Creation timestamp.
    defaultAction string
    Default action for traffic not matching any rule: 'drop' or 'accept'.
    description string
    Description of the firewall.
    isDefault boolean
    Whether this is the default firewall for the team.
    name string
    Name of the firewall.
    rules FirewallRule[]
    List of firewall rules.
    status string
    Current status of the firewall.
    updatedAt string
    Timestamp when the firewall was last updated.
    created_at str
    Creation timestamp.
    default_action str
    Default action for traffic not matching any rule: 'drop' or 'accept'.
    description str
    Description of the firewall.
    is_default bool
    Whether this is the default firewall for the team.
    name str
    Name of the firewall.
    rules Sequence[FirewallRuleArgs]
    List of firewall rules.
    status str
    Current status of the firewall.
    updated_at str
    Timestamp when the firewall was last updated.
    createdAt String
    Creation timestamp.
    defaultAction String
    Default action for traffic not matching any rule: 'drop' or 'accept'.
    description String
    Description of the firewall.
    isDefault Boolean
    Whether this is the default firewall for the team.
    name String
    Name of the firewall.
    rules List<Property Map>
    List of firewall rules.
    status String
    Current status of the firewall.
    updatedAt String
    Timestamp when the firewall was last updated.

    Supporting Types

    FirewallRule, FirewallRuleArgs

    Action string
    Action: allow or deny.
    Direction string
    Direction: inbound or outbound.
    Protocol string
    Protocol: tcp, udp, icmp, or all.
    Id string
    The firewall ID.
    Name string
    Name of the rule.
    PortRangeEnd int
    End of port range.
    PortRangeStart int
    Start of port range.
    Priority int
    Rule priority (lower = higher priority).
    SourceIps List<string>
    List of source IP addresses/CIDRs.
    Action string
    Action: allow or deny.
    Direction string
    Direction: inbound or outbound.
    Protocol string
    Protocol: tcp, udp, icmp, or all.
    Id string
    The firewall ID.
    Name string
    Name of the rule.
    PortRangeEnd int
    End of port range.
    PortRangeStart int
    Start of port range.
    Priority int
    Rule priority (lower = higher priority).
    SourceIps []string
    List of source IP addresses/CIDRs.
    action String
    Action: allow or deny.
    direction String
    Direction: inbound or outbound.
    protocol String
    Protocol: tcp, udp, icmp, or all.
    id String
    The firewall ID.
    name String
    Name of the rule.
    portRangeEnd Integer
    End of port range.
    portRangeStart Integer
    Start of port range.
    priority Integer
    Rule priority (lower = higher priority).
    sourceIps List<String>
    List of source IP addresses/CIDRs.
    action string
    Action: allow or deny.
    direction string
    Direction: inbound or outbound.
    protocol string
    Protocol: tcp, udp, icmp, or all.
    id string
    The firewall ID.
    name string
    Name of the rule.
    portRangeEnd number
    End of port range.
    portRangeStart number
    Start of port range.
    priority number
    Rule priority (lower = higher priority).
    sourceIps string[]
    List of source IP addresses/CIDRs.
    action str
    Action: allow or deny.
    direction str
    Direction: inbound or outbound.
    protocol str
    Protocol: tcp, udp, icmp, or all.
    id str
    The firewall ID.
    name str
    Name of the rule.
    port_range_end int
    End of port range.
    port_range_start int
    Start of port range.
    priority int
    Rule priority (lower = higher priority).
    source_ips Sequence[str]
    List of source IP addresses/CIDRs.
    action String
    Action: allow or deny.
    direction String
    Direction: inbound or outbound.
    protocol String
    Protocol: tcp, udp, icmp, or all.
    id String
    The firewall ID.
    name String
    Name of the rule.
    portRangeEnd Number
    End of port range.
    portRangeStart Number
    Start of port range.
    priority Number
    Rule priority (lower = higher priority).
    sourceIps List<String>
    List of source IP addresses/CIDRs.

    Import

    Firewalls can be imported using their ID:

    bash

    $ pulumi import danubedata:index/firewall:Firewall example fw-abc123
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    danubedata AdrianSilaghi/pulumi-danubedata
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the danubedata Terraform Provider.
    danubedata logo
    DanubeData v0.1.7 published on Sunday, Feb 1, 2026 by AdrianSilaghi
      Meet Neo: Your AI Platform Teammate