1. Packages
  2. Linode Provider
  3. API Docs
  4. getFirewall
Linode v4.37.0 published on Thursday, Apr 10, 2025 by Pulumi

linode.getFirewall

Explore with Pulumi AI

Linode v4.37.0 published on Thursday, Apr 10, 2025 by Pulumi

Provides details about a Linode Firewall. For more information, see the Linode APIv4 docs.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as linode from "@pulumi/linode";

const my_firewall = linode.getFirewall({
    id: 123,
});
Copy
import pulumi
import pulumi_linode as linode

my_firewall = linode.get_firewall(id=123)
Copy
package main

import (
	"github.com/pulumi/pulumi-linode/sdk/v4/go/linode"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := linode.LookupFirewall(ctx, &linode.LookupFirewallArgs{
			Id: 123,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Linode = Pulumi.Linode;

return await Deployment.RunAsync(() => 
{
    var my_firewall = Linode.GetFirewall.Invoke(new()
    {
        Id = 123,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.linode.LinodeFunctions;
import com.pulumi.linode.inputs.GetFirewallArgs;
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) {
        final var my-firewall = LinodeFunctions.getFirewall(GetFirewallArgs.builder()
            .id(123)
            .build());

    }
}
Copy
variables:
  my-firewall:
    fn::invoke:
      function: linode:getFirewall
      arguments:
        id: 123
Copy

Using getFirewall

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getFirewall(args: GetFirewallArgs, opts?: InvokeOptions): Promise<GetFirewallResult>
function getFirewallOutput(args: GetFirewallOutputArgs, opts?: InvokeOptions): Output<GetFirewallResult>
Copy
def get_firewall(id: Optional[int] = None,
                 opts: Optional[InvokeOptions] = None) -> GetFirewallResult
def get_firewall_output(id: Optional[pulumi.Input[int]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetFirewallResult]
Copy
func LookupFirewall(ctx *Context, args *LookupFirewallArgs, opts ...InvokeOption) (*LookupFirewallResult, error)
func LookupFirewallOutput(ctx *Context, args *LookupFirewallOutputArgs, opts ...InvokeOption) LookupFirewallResultOutput
Copy

> Note: This function is named LookupFirewall in the Go SDK.

public static class GetFirewall 
{
    public static Task<GetFirewallResult> InvokeAsync(GetFirewallArgs args, InvokeOptions? opts = null)
    public static Output<GetFirewallResult> Invoke(GetFirewallInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetFirewallResult> getFirewall(GetFirewallArgs args, InvokeOptions options)
public static Output<GetFirewallResult> getFirewall(GetFirewallArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: linode:index/getFirewall:getFirewall
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Id This property is required. int
The Firewall's ID.
Id This property is required. int
The Firewall's ID.
id This property is required. Integer
The Firewall's ID.
id This property is required. number
The Firewall's ID.
id This property is required. int
The Firewall's ID.
id This property is required. Number
The Firewall's ID.

getFirewall Result

The following output properties are available:

Created string
When this firewall was created.
Devices List<GetFirewallDevice>
Disabled bool
If true, the firewall is inactive.
Id int
The ID of the Firewall Device.
InboundPolicy string
The default behavior for inbound traffic. (ACCEPT, DROP)
Inbounds List<GetFirewallInbound>
Label string
The label of the underlying entity this device references.
Linodes List<int>
The IDs of Linodes assigned to this Firewall.
Nodebalancers List<int>
The IDs of NodeBalancers assigned to this Firewall.
OutboundPolicy string
The default behavior for outbound traffic. (ACCEPT, DROP)
Outbounds List<GetFirewallOutbound>
Status string
The status of the firewall. (enabled, disabled, deleted)
Tags List<string>
The tags applied to the firewall. Tags are case-insensitive and are for organizational purposes only.
Updated string
When this firewall was last updated.
Created string
When this firewall was created.
Devices []GetFirewallDeviceType
Disabled bool
If true, the firewall is inactive.
Id int
The ID of the Firewall Device.
InboundPolicy string
The default behavior for inbound traffic. (ACCEPT, DROP)
Inbounds []GetFirewallInbound
Label string
The label of the underlying entity this device references.
Linodes []int
The IDs of Linodes assigned to this Firewall.
Nodebalancers []int
The IDs of NodeBalancers assigned to this Firewall.
OutboundPolicy string
The default behavior for outbound traffic. (ACCEPT, DROP)
Outbounds []GetFirewallOutbound
Status string
The status of the firewall. (enabled, disabled, deleted)
Tags []string
The tags applied to the firewall. Tags are case-insensitive and are for organizational purposes only.
Updated string
When this firewall was last updated.
created String
When this firewall was created.
devices List<GetFirewallDevice>
disabled Boolean
If true, the firewall is inactive.
id Integer
The ID of the Firewall Device.
inboundPolicy String
The default behavior for inbound traffic. (ACCEPT, DROP)
inbounds List<GetFirewallInbound>
label String
The label of the underlying entity this device references.
linodes List<Integer>
The IDs of Linodes assigned to this Firewall.
nodebalancers List<Integer>
The IDs of NodeBalancers assigned to this Firewall.
outboundPolicy String
The default behavior for outbound traffic. (ACCEPT, DROP)
outbounds List<GetFirewallOutbound>
status String
The status of the firewall. (enabled, disabled, deleted)
tags List<String>
The tags applied to the firewall. Tags are case-insensitive and are for organizational purposes only.
updated String
When this firewall was last updated.
created string
When this firewall was created.
devices GetFirewallDevice[]
disabled boolean
If true, the firewall is inactive.
id number
The ID of the Firewall Device.
inboundPolicy string
The default behavior for inbound traffic. (ACCEPT, DROP)
inbounds GetFirewallInbound[]
label string
The label of the underlying entity this device references.
linodes number[]
The IDs of Linodes assigned to this Firewall.
nodebalancers number[]
The IDs of NodeBalancers assigned to this Firewall.
outboundPolicy string
The default behavior for outbound traffic. (ACCEPT, DROP)
outbounds GetFirewallOutbound[]
status string
The status of the firewall. (enabled, disabled, deleted)
tags string[]
The tags applied to the firewall. Tags are case-insensitive and are for organizational purposes only.
updated string
When this firewall was last updated.
created str
When this firewall was created.
devices Sequence[GetFirewallDevice]
disabled bool
If true, the firewall is inactive.
id int
The ID of the Firewall Device.
inbound_policy str
The default behavior for inbound traffic. (ACCEPT, DROP)
inbounds Sequence[GetFirewallInbound]
label str
The label of the underlying entity this device references.
linodes Sequence[int]
The IDs of Linodes assigned to this Firewall.
nodebalancers Sequence[int]
The IDs of NodeBalancers assigned to this Firewall.
outbound_policy str
The default behavior for outbound traffic. (ACCEPT, DROP)
outbounds Sequence[GetFirewallOutbound]
status str
The status of the firewall. (enabled, disabled, deleted)
tags Sequence[str]
The tags applied to the firewall. Tags are case-insensitive and are for organizational purposes only.
updated str
When this firewall was last updated.
created String
When this firewall was created.
devices List<Property Map>
disabled Boolean
If true, the firewall is inactive.
id Number
The ID of the Firewall Device.
inboundPolicy String
The default behavior for inbound traffic. (ACCEPT, DROP)
inbounds List<Property Map>
label String
The label of the underlying entity this device references.
linodes List<Number>
The IDs of Linodes assigned to this Firewall.
nodebalancers List<Number>
The IDs of NodeBalancers assigned to this Firewall.
outboundPolicy String
The default behavior for outbound traffic. (ACCEPT, DROP)
outbounds List<Property Map>
status String
The status of the firewall. (enabled, disabled, deleted)
tags List<String>
The tags applied to the firewall. Tags are case-insensitive and are for organizational purposes only.
updated String
When this firewall was last updated.

Supporting Types

GetFirewallDevice

EntityId This property is required. int
The ID of the underlying entity this device references (i.e. the Linode's ID).
Id This property is required. int
The Firewall's ID.
Label This property is required. string
The label of the underlying entity this device references.
Type This property is required. string
The type of Firewall Device.
Url This property is required. string
The URL of the underlying entity this device references.
EntityId This property is required. int
The ID of the underlying entity this device references (i.e. the Linode's ID).
Id This property is required. int
The Firewall's ID.
Label This property is required. string
The label of the underlying entity this device references.
Type This property is required. string
The type of Firewall Device.
Url This property is required. string
The URL of the underlying entity this device references.
entityId This property is required. Integer
The ID of the underlying entity this device references (i.e. the Linode's ID).
id This property is required. Integer
The Firewall's ID.
label This property is required. String
The label of the underlying entity this device references.
type This property is required. String
The type of Firewall Device.
url This property is required. String
The URL of the underlying entity this device references.
entityId This property is required. number
The ID of the underlying entity this device references (i.e. the Linode's ID).
id This property is required. number
The Firewall's ID.
label This property is required. string
The label of the underlying entity this device references.
type This property is required. string
The type of Firewall Device.
url This property is required. string
The URL of the underlying entity this device references.
entity_id This property is required. int
The ID of the underlying entity this device references (i.e. the Linode's ID).
id This property is required. int
The Firewall's ID.
label This property is required. str
The label of the underlying entity this device references.
type This property is required. str
The type of Firewall Device.
url This property is required. str
The URL of the underlying entity this device references.
entityId This property is required. Number
The ID of the underlying entity this device references (i.e. the Linode's ID).
id This property is required. Number
The Firewall's ID.
label This property is required. String
The label of the underlying entity this device references.
type This property is required. String
The type of Firewall Device.
url This property is required. String
The URL of the underlying entity this device references.

GetFirewallInbound

Action This property is required. string
Controls whether traffic is accepted or dropped by this rule. Overrides the Firewall’s inbound_policy if this is an inbound rule, or the outbound_policy if this is an outbound rule.
Description This property is required. string
Ipv4s This property is required. List<string>
A list of IPv4 addresses or networks. Must be in IP/mask format.
Ipv6s This property is required. List<string>
A list of IPv6 addresses or networks. Must be in IP/mask format.
Label This property is required. string
The label of the underlying entity this device references.
Ports This property is required. string
A string representation of ports and/or port ranges (i.e. "443" or "80-90, 91").
Protocol This property is required. string
The network protocol this rule controls. (TCP, UDP, ICMP)
Action This property is required. string
Controls whether traffic is accepted or dropped by this rule. Overrides the Firewall’s inbound_policy if this is an inbound rule, or the outbound_policy if this is an outbound rule.
Description This property is required. string
Ipv4s This property is required. []string
A list of IPv4 addresses or networks. Must be in IP/mask format.
Ipv6s This property is required. []string
A list of IPv6 addresses or networks. Must be in IP/mask format.
Label This property is required. string
The label of the underlying entity this device references.
Ports This property is required. string
A string representation of ports and/or port ranges (i.e. "443" or "80-90, 91").
Protocol This property is required. string
The network protocol this rule controls. (TCP, UDP, ICMP)
action This property is required. String
Controls whether traffic is accepted or dropped by this rule. Overrides the Firewall’s inbound_policy if this is an inbound rule, or the outbound_policy if this is an outbound rule.
description This property is required. String
ipv4s This property is required. List<String>
A list of IPv4 addresses or networks. Must be in IP/mask format.
ipv6s This property is required. List<String>
A list of IPv6 addresses or networks. Must be in IP/mask format.
label This property is required. String
The label of the underlying entity this device references.
ports This property is required. String
A string representation of ports and/or port ranges (i.e. "443" or "80-90, 91").
protocol This property is required. String
The network protocol this rule controls. (TCP, UDP, ICMP)
action This property is required. string
Controls whether traffic is accepted or dropped by this rule. Overrides the Firewall’s inbound_policy if this is an inbound rule, or the outbound_policy if this is an outbound rule.
description This property is required. string
ipv4s This property is required. string[]
A list of IPv4 addresses or networks. Must be in IP/mask format.
ipv6s This property is required. string[]
A list of IPv6 addresses or networks. Must be in IP/mask format.
label This property is required. string
The label of the underlying entity this device references.
ports This property is required. string
A string representation of ports and/or port ranges (i.e. "443" or "80-90, 91").
protocol This property is required. string
The network protocol this rule controls. (TCP, UDP, ICMP)
action This property is required. str
Controls whether traffic is accepted or dropped by this rule. Overrides the Firewall’s inbound_policy if this is an inbound rule, or the outbound_policy if this is an outbound rule.
description This property is required. str
ipv4s This property is required. Sequence[str]
A list of IPv4 addresses or networks. Must be in IP/mask format.
ipv6s This property is required. Sequence[str]
A list of IPv6 addresses or networks. Must be in IP/mask format.
label This property is required. str
The label of the underlying entity this device references.
ports This property is required. str
A string representation of ports and/or port ranges (i.e. "443" or "80-90, 91").
protocol This property is required. str
The network protocol this rule controls. (TCP, UDP, ICMP)
action This property is required. String
Controls whether traffic is accepted or dropped by this rule. Overrides the Firewall’s inbound_policy if this is an inbound rule, or the outbound_policy if this is an outbound rule.
description This property is required. String
ipv4s This property is required. List<String>
A list of IPv4 addresses or networks. Must be in IP/mask format.
ipv6s This property is required. List<String>
A list of IPv6 addresses or networks. Must be in IP/mask format.
label This property is required. String
The label of the underlying entity this device references.
ports This property is required. String
A string representation of ports and/or port ranges (i.e. "443" or "80-90, 91").
protocol This property is required. String
The network protocol this rule controls. (TCP, UDP, ICMP)

GetFirewallOutbound

Action This property is required. string
Controls whether traffic is accepted or dropped by this rule. Overrides the Firewall’s inbound_policy if this is an inbound rule, or the outbound_policy if this is an outbound rule.
Description This property is required. string
Ipv4s This property is required. List<string>
A list of IPv4 addresses or networks. Must be in IP/mask format.
Ipv6s This property is required. List<string>
A list of IPv6 addresses or networks. Must be in IP/mask format.
Label This property is required. string
The label of the underlying entity this device references.
Ports This property is required. string
A string representation of ports and/or port ranges (i.e. "443" or "80-90, 91").
Protocol This property is required. string
The network protocol this rule controls. (TCP, UDP, ICMP)
Action This property is required. string
Controls whether traffic is accepted or dropped by this rule. Overrides the Firewall’s inbound_policy if this is an inbound rule, or the outbound_policy if this is an outbound rule.
Description This property is required. string
Ipv4s This property is required. []string
A list of IPv4 addresses or networks. Must be in IP/mask format.
Ipv6s This property is required. []string
A list of IPv6 addresses or networks. Must be in IP/mask format.
Label This property is required. string
The label of the underlying entity this device references.
Ports This property is required. string
A string representation of ports and/or port ranges (i.e. "443" or "80-90, 91").
Protocol This property is required. string
The network protocol this rule controls. (TCP, UDP, ICMP)
action This property is required. String
Controls whether traffic is accepted or dropped by this rule. Overrides the Firewall’s inbound_policy if this is an inbound rule, or the outbound_policy if this is an outbound rule.
description This property is required. String
ipv4s This property is required. List<String>
A list of IPv4 addresses or networks. Must be in IP/mask format.
ipv6s This property is required. List<String>
A list of IPv6 addresses or networks. Must be in IP/mask format.
label This property is required. String
The label of the underlying entity this device references.
ports This property is required. String
A string representation of ports and/or port ranges (i.e. "443" or "80-90, 91").
protocol This property is required. String
The network protocol this rule controls. (TCP, UDP, ICMP)
action This property is required. string
Controls whether traffic is accepted or dropped by this rule. Overrides the Firewall’s inbound_policy if this is an inbound rule, or the outbound_policy if this is an outbound rule.
description This property is required. string
ipv4s This property is required. string[]
A list of IPv4 addresses or networks. Must be in IP/mask format.
ipv6s This property is required. string[]
A list of IPv6 addresses or networks. Must be in IP/mask format.
label This property is required. string
The label of the underlying entity this device references.
ports This property is required. string
A string representation of ports and/or port ranges (i.e. "443" or "80-90, 91").
protocol This property is required. string
The network protocol this rule controls. (TCP, UDP, ICMP)
action This property is required. str
Controls whether traffic is accepted or dropped by this rule. Overrides the Firewall’s inbound_policy if this is an inbound rule, or the outbound_policy if this is an outbound rule.
description This property is required. str
ipv4s This property is required. Sequence[str]
A list of IPv4 addresses or networks. Must be in IP/mask format.
ipv6s This property is required. Sequence[str]
A list of IPv6 addresses or networks. Must be in IP/mask format.
label This property is required. str
The label of the underlying entity this device references.
ports This property is required. str
A string representation of ports and/or port ranges (i.e. "443" or "80-90, 91").
protocol This property is required. str
The network protocol this rule controls. (TCP, UDP, ICMP)
action This property is required. String
Controls whether traffic is accepted or dropped by this rule. Overrides the Firewall’s inbound_policy if this is an inbound rule, or the outbound_policy if this is an outbound rule.
description This property is required. String
ipv4s This property is required. List<String>
A list of IPv4 addresses or networks. Must be in IP/mask format.
ipv6s This property is required. List<String>
A list of IPv6 addresses or networks. Must be in IP/mask format.
label This property is required. String
The label of the underlying entity this device references.
ports This property is required. String
A string representation of ports and/or port ranges (i.e. "443" or "80-90, 91").
protocol This property is required. String
The network protocol this rule controls. (TCP, UDP, ICMP)

Package Details

Repository
Linode pulumi/pulumi-linode
License
Apache-2.0
Notes
This Pulumi package is based on the linode Terraform Provider.
Linode v4.37.0 published on Thursday, Apr 10, 2025 by Pulumi