1. Registry
  2. Packages
  3. Linode Provider
  4. API Docs
  5. getFirewallTemplates
Viewing docs for Linode v6.6.0
published on Tuesday, Sep 15, 2026 by Pulumi
linode logo linode logo
Viewing docs for Linode v6.6.0
published on Tuesday, Sep 15, 2026 by Pulumi

    Provides information about all Linode Firewall Templates.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as linode from "@pulumi/linode";
    
    const all = linode.getFirewallTemplates({});
    export const firewallTemplateSlugs = all.then(all => all.firewallTemplates);
    
    import pulumi
    import pulumi_linode as linode
    
    all = linode.get_firewall_templates()
    pulumi.export("firewallTemplateSlugs", all.firewall_templates)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-linode/sdk/v6/go/linode"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		all, err := linode.GetFirewallTemplates(ctx, &linode.GetFirewallTemplatesArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("firewallTemplateSlugs", all.FirewallTemplates)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Linode = Pulumi.Linode;
    
    return await Deployment.RunAsync(() => 
    {
        var all = Linode.GetFirewallTemplates.Invoke();
    
        return new Dictionary<string, object?>
        {
            ["firewallTemplateSlugs"] = all.Apply(getFirewallTemplatesResult => getFirewallTemplatesResult.FirewallTemplates),
        };
    });
    
    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.GetFirewallTemplatesArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 all = LinodeFunctions.getFirewallTemplates(GetFirewallTemplatesArgs.builder()
                .build());
    
            ctx.export("firewallTemplateSlugs", all.firewallTemplates());
        }
    }
    
    variables:
      all:
        fn::invoke:
          function: linode:getFirewallTemplates
          arguments: {}
    outputs:
      firewallTemplateSlugs: ${all.firewallTemplates}
    
    pulumi {
      required_providers {
        linode = {
          source = "pulumi/linode"
        }
      }
    }
    
    data "linode_getfirewalltemplates" "all" {
    }
    
    output "firewallTemplateSlugs" {
      value = data.linode_getfirewalltemplates.all.firewall_templates
    }
    

    Or with some filters to get a subset of the results.

    import * as pulumi from "@pulumi/pulumi";
    import * as linode from "@pulumi/linode";
    
    const filtered = linode.getFirewallTemplates({
        filters: [{
            name: "slug",
            values: ["public"],
            matchBy: "exact",
        }],
    });
    export const firewallTemplateSlugs = filtered.then(filtered => filtered.firewallTemplates);
    
    import pulumi
    import pulumi_linode as linode
    
    filtered = linode.get_firewall_templates(filters=[{
        "name": "slug",
        "values": ["public"],
        "match_by": "exact",
    }])
    pulumi.export("firewallTemplateSlugs", filtered.firewall_templates)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-linode/sdk/v6/go/linode"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		filtered, err := linode.GetFirewallTemplates(ctx, &linode.GetFirewallTemplatesArgs{
    			Filters: []linode.GetFirewallTemplatesFilter{
    				{
    					Name: "slug",
    					Values: []string{
    						"public",
    					},
    					MatchBy: pulumi.StringRef("exact"),
    				},
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("firewallTemplateSlugs", filtered.FirewallTemplates)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Linode = Pulumi.Linode;
    
    return await Deployment.RunAsync(() => 
    {
        var filtered = Linode.GetFirewallTemplates.Invoke(new()
        {
            Filters = new[]
            {
                new Linode.Inputs.GetFirewallTemplatesFilterInputArgs
                {
                    Name = "slug",
                    Values = new[]
                    {
                        "public",
                    },
                    MatchBy = "exact",
                },
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["firewallTemplateSlugs"] = filtered.Apply(getFirewallTemplatesResult => getFirewallTemplatesResult.FirewallTemplates),
        };
    });
    
    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.GetFirewallTemplatesArgs;
    import com.pulumi.linode.inputs.GetFirewallTemplatesFilterArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 filtered = LinodeFunctions.getFirewallTemplates(GetFirewallTemplatesArgs.builder()
                .filters(GetFirewallTemplatesFilterArgs.builder()
                    .name("slug")
                    .values("public")
                    .matchBy("exact")
                    .build())
                .build());
    
            ctx.export("firewallTemplateSlugs", filtered.firewallTemplates());
        }
    }
    
    variables:
      filtered:
        fn::invoke:
          function: linode:getFirewallTemplates
          arguments:
            filters:
              - name: slug
                values:
                  - public
                matchBy: exact
    outputs:
      firewallTemplateSlugs: ${filtered.firewallTemplates}
    
    pulumi {
      required_providers {
        linode = {
          source = "pulumi/linode"
        }
      }
    }
    
    data "linode_getfirewalltemplates" "filtered" {
      filters {
        name     = "slug"
        values   = ["public"]
        match_by = "exact"
      }
    }
    
    output "firewallTemplateSlugs" {
      value = data.linode_getfirewalltemplates.filtered.firewall_templates
    }
    

    Filterable Fields

    • slug

    Using getFirewallTemplates

    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 getFirewallTemplates(args: GetFirewallTemplatesArgs, opts?: InvokeOptions): Promise<GetFirewallTemplatesResult>
    function getFirewallTemplatesOutput(args: GetFirewallTemplatesOutputArgs, opts?: InvokeOutputOptions): Output<GetFirewallTemplatesResult>
    def get_firewall_templates(filters: Optional[Sequence[GetFirewallTemplatesFilter]] = None,
                               opts: Optional[InvokeOptions] = None) -> GetFirewallTemplatesResult
    def get_firewall_templates_output(filters: pulumi.Input[Optional[Sequence[pulumi.Input[GetFirewallTemplatesFilterArgs]]]] = None,
                               opts: Optional[InvokeOutputOptions] = None) -> Output[GetFirewallTemplatesResult]
    func GetFirewallTemplates(ctx *Context, args *GetFirewallTemplatesArgs, opts ...InvokeOption) (*GetFirewallTemplatesResult, error)
    func GetFirewallTemplatesOutput(ctx *Context, args *GetFirewallTemplatesOutputArgs, opts ...InvokeOption) GetFirewallTemplatesResultOutput

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

    public static class GetFirewallTemplates 
    {
        public static Task<GetFirewallTemplatesResult> InvokeAsync(GetFirewallTemplatesArgs args, InvokeOptions? opts = null)
        public static Output<GetFirewallTemplatesResult> Invoke(GetFirewallTemplatesInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetFirewallTemplatesResult> Invoke(GetFirewallTemplatesInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetFirewallTemplatesResult> getFirewallTemplates(GetFirewallTemplatesArgs args, InvokeOptions options)
    public static Output<GetFirewallTemplatesResult> getFirewallTemplates(GetFirewallTemplatesArgs args, InvokeOptions options)
    public static Output<GetFirewallTemplatesResult> getFirewallTemplates(GetFirewallTemplatesArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: linode:index/getFirewallTemplates:getFirewallTemplates
      arguments:
        # arguments dictionary
    data "linode_get_firewall_templates" "name" {
        # arguments
    }

    The following arguments are supported:

    getFirewallTemplates Result

    The following output properties are available:

    FirewallTemplates List<GetFirewallTemplatesFirewallTemplate>
    (Nested Attribute List) The returned list of firewall templates. Referenced by index (e.g. firewall_templates[0].slug).
    Id string
    Filters List<GetFirewallTemplatesFilter>
    FirewallTemplates []GetFirewallTemplatesFirewallTemplate
    (Nested Attribute List) The returned list of firewall templates. Referenced by index (e.g. firewall_templates[0].slug).
    Id string
    Filters []GetFirewallTemplatesFilter
    firewall_templates list(object)
    (Nested Attribute List) The returned list of firewall templates. Referenced by index (e.g. firewall_templates[0].slug).
    id string
    filters list(object)
    firewallTemplates List<GetFirewallTemplatesFirewallTemplate>
    (Nested Attribute List) The returned list of firewall templates. Referenced by index (e.g. firewall_templates[0].slug).
    id String
    filters List<GetFirewallTemplatesFilter>
    firewallTemplates GetFirewallTemplatesFirewallTemplate[]
    (Nested Attribute List) The returned list of firewall templates. Referenced by index (e.g. firewall_templates[0].slug).
    id string
    filters GetFirewallTemplatesFilter[]
    firewall_templates Sequence[GetFirewallTemplatesFirewallTemplate]
    (Nested Attribute List) The returned list of firewall templates. Referenced by index (e.g. firewall_templates[0].slug).
    id str
    filters Sequence[GetFirewallTemplatesFilter]
    firewallTemplates List<Property Map>
    (Nested Attribute List) The returned list of firewall templates. Referenced by index (e.g. firewall_templates[0].slug).
    id String
    filters List<Property Map>

    Supporting Types

    GetFirewallTemplatesFilter

    Name string
    The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
    Values List<string>
    A list of values for the filter to allow. These values should all be in string form.
    MatchBy string
    The method to match the field by. (exact, regex, substring; default exact)
    Name string
    The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
    Values []string
    A list of values for the filter to allow. These values should all be in string form.
    MatchBy string
    The method to match the field by. (exact, regex, substring; default exact)
    name string
    The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
    values list(string)
    A list of values for the filter to allow. These values should all be in string form.
    match_by string
    The method to match the field by. (exact, regex, substring; default exact)
    name String
    The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
    values List<String>
    A list of values for the filter to allow. These values should all be in string form.
    matchBy String
    The method to match the field by. (exact, regex, substring; default exact)
    name string
    The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
    values string[]
    A list of values for the filter to allow. These values should all be in string form.
    matchBy string
    The method to match the field by. (exact, regex, substring; default exact)
    name str
    The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
    values Sequence[str]
    A list of values for the filter to allow. These values should all be in string form.
    match_by str
    The method to match the field by. (exact, regex, substring; default exact)
    name String
    The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
    values List<String>
    A list of values for the filter to allow. These values should all be in string form.
    matchBy String
    The method to match the field by. (exact, regex, substring; default exact)

    GetFirewallTemplatesFirewallTemplate

    InboundPolicy string
    The default behavior for inbound traffic.
    Inbounds List<GetFirewallTemplatesFirewallTemplateInbound>
    (Read-Only Object List) A list of firewall rules specifying allowed inbound network traffic. Referenced with an index (e.g. inbound.0.action).
    OutboundPolicy string
    The default behavior for outbound traffic.
    Outbounds List<GetFirewallTemplatesFirewallTemplateOutbound>
    (Read-Only Object List) A list of firewall rules specifying allowed outbound network traffic. Referenced with an index (e.g. outbound.0.action).
    Slug string
    The slug of the firewall template.
    InboundPolicy string
    The default behavior for inbound traffic.
    Inbounds []GetFirewallTemplatesFirewallTemplateInbound
    (Read-Only Object List) A list of firewall rules specifying allowed inbound network traffic. Referenced with an index (e.g. inbound.0.action).
    OutboundPolicy string
    The default behavior for outbound traffic.
    Outbounds []GetFirewallTemplatesFirewallTemplateOutbound
    (Read-Only Object List) A list of firewall rules specifying allowed outbound network traffic. Referenced with an index (e.g. outbound.0.action).
    Slug string
    The slug of the firewall template.
    inbound_policy string
    The default behavior for inbound traffic.
    inbounds list(object)
    (Read-Only Object List) A list of firewall rules specifying allowed inbound network traffic. Referenced with an index (e.g. inbound.0.action).
    outbound_policy string
    The default behavior for outbound traffic.
    outbounds list(object)
    (Read-Only Object List) A list of firewall rules specifying allowed outbound network traffic. Referenced with an index (e.g. outbound.0.action).
    slug string
    The slug of the firewall template.
    inboundPolicy String
    The default behavior for inbound traffic.
    inbounds List<GetFirewallTemplatesFirewallTemplateInbound>
    (Read-Only Object List) A list of firewall rules specifying allowed inbound network traffic. Referenced with an index (e.g. inbound.0.action).
    outboundPolicy String
    The default behavior for outbound traffic.
    outbounds List<GetFirewallTemplatesFirewallTemplateOutbound>
    (Read-Only Object List) A list of firewall rules specifying allowed outbound network traffic. Referenced with an index (e.g. outbound.0.action).
    slug String
    The slug of the firewall template.
    inboundPolicy string
    The default behavior for inbound traffic.
    inbounds GetFirewallTemplatesFirewallTemplateInbound[]
    (Read-Only Object List) A list of firewall rules specifying allowed inbound network traffic. Referenced with an index (e.g. inbound.0.action).
    outboundPolicy string
    The default behavior for outbound traffic.
    outbounds GetFirewallTemplatesFirewallTemplateOutbound[]
    (Read-Only Object List) A list of firewall rules specifying allowed outbound network traffic. Referenced with an index (e.g. outbound.0.action).
    slug string
    The slug of the firewall template.
    inbound_policy str
    The default behavior for inbound traffic.
    inbounds Sequence[GetFirewallTemplatesFirewallTemplateInbound]
    (Read-Only Object List) A list of firewall rules specifying allowed inbound network traffic. Referenced with an index (e.g. inbound.0.action).
    outbound_policy str
    The default behavior for outbound traffic.
    outbounds Sequence[GetFirewallTemplatesFirewallTemplateOutbound]
    (Read-Only Object List) A list of firewall rules specifying allowed outbound network traffic. Referenced with an index (e.g. outbound.0.action).
    slug str
    The slug of the firewall template.
    inboundPolicy String
    The default behavior for inbound traffic.
    inbounds List<Property Map>
    (Read-Only Object List) A list of firewall rules specifying allowed inbound network traffic. Referenced with an index (e.g. inbound.0.action).
    outboundPolicy String
    The default behavior for outbound traffic.
    outbounds List<Property Map>
    (Read-Only Object List) A list of firewall rules specifying allowed outbound network traffic. Referenced with an index (e.g. outbound.0.action).
    slug String
    The slug of the firewall template.

    GetFirewallTemplatesFirewallTemplateInbound

    Action string
    Description string
    Ipv4s List<string>
    Ipv6s List<string>
    Label string
    Ports string
    Protocol string
    Action string
    Description string
    Ipv4s []string
    Ipv6s []string
    Label string
    Ports string
    Protocol string
    action string
    description string
    ipv4s list(string)
    ipv6s list(string)
    label string
    ports string
    protocol string
    action String
    description String
    ipv4s List<String>
    ipv6s List<String>
    label String
    ports String
    protocol String
    action string
    description string
    ipv4s string[]
    ipv6s string[]
    label string
    ports string
    protocol string
    action str
    description str
    ipv4s Sequence[str]
    ipv6s Sequence[str]
    label str
    ports str
    protocol str
    action String
    description String
    ipv4s List<String>
    ipv6s List<String>
    label String
    ports String
    protocol String

    GetFirewallTemplatesFirewallTemplateOutbound

    Action string
    Description string
    Ipv4s List<string>
    Ipv6s List<string>
    Label string
    Ports string
    Protocol string
    Action string
    Description string
    Ipv4s []string
    Ipv6s []string
    Label string
    Ports string
    Protocol string
    action string
    description string
    ipv4s list(string)
    ipv6s list(string)
    label string
    ports string
    protocol string
    action String
    description String
    ipv4s List<String>
    ipv6s List<String>
    label String
    ports String
    protocol String
    action string
    description string
    ipv4s string[]
    ipv6s string[]
    label string
    ports string
    protocol string
    action str
    description str
    ipv4s Sequence[str]
    ipv6s Sequence[str]
    label str
    ports str
    protocol str
    action String
    description String
    ipv4s List<String>
    ipv6s List<String>
    label String
    ports String
    protocol String

    Package Details

    Repository
    Linode pulumi/pulumi-linode
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the linode Terraform Provider.
    linode logo linode logo
    Viewing docs for Linode v6.6.0
    published on Tuesday, Sep 15, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial