1. Packages
  2. Linode Provider
  3. API Docs
  4. getFirewallTemplate
Linode v5.6.0 published on Wednesday, Dec 24, 2025 by Pulumi
linode logo
Linode v5.6.0 published on Wednesday, Dec 24, 2025 by Pulumi

    Provides information about a Linode Firewall Template.

    Example Usage

    The following example shows how one might use this data source to access information about a specific Firewall Template:

    import * as pulumi from "@pulumi/pulumi";
    import * as linode from "@pulumi/linode";
    
    const public_template = linode.getFirewallTemplate({
        slug: "public",
    });
    export const firewallTemplateId = public_template.then(public_template => public_template.id);
    
    import pulumi
    import pulumi_linode as linode
    
    public_template = linode.get_firewall_template(slug="public")
    pulumi.export("firewallTemplateId", public_template.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-linode/sdk/v5/go/linode"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		public_template, err := linode.GetFirewallTemplate(ctx, &linode.GetFirewallTemplateArgs{
    			Slug: "public",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("firewallTemplateId", public_template.Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Linode = Pulumi.Linode;
    
    return await Deployment.RunAsync(() => 
    {
        var public_template = Linode.GetFirewallTemplate.Invoke(new()
        {
            Slug = "public",
        });
    
        return new Dictionary<string, object?>
        {
            ["firewallTemplateId"] = public_template.Apply(public_template => public_template.Apply(getFirewallTemplateResult => getFirewallTemplateResult.Id)),
        };
    });
    
    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.GetFirewallTemplateArgs;
    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 public-template = LinodeFunctions.getFirewallTemplate(GetFirewallTemplateArgs.builder()
                .slug("public")
                .build());
    
            ctx.export("firewallTemplateId", public_template.id());
        }
    }
    
    variables:
      public-template:
        fn::invoke:
          function: linode:getFirewallTemplate
          arguments:
            slug: public
    outputs:
      firewallTemplateId: ${["public-template"].id}
    

    Using getFirewallTemplate

    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 getFirewallTemplate(args: GetFirewallTemplateArgs, opts?: InvokeOptions): Promise<GetFirewallTemplateResult>
    function getFirewallTemplateOutput(args: GetFirewallTemplateOutputArgs, opts?: InvokeOptions): Output<GetFirewallTemplateResult>
    def get_firewall_template(slug: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetFirewallTemplateResult
    def get_firewall_template_output(slug: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetFirewallTemplateResult]
    func GetFirewallTemplate(ctx *Context, args *GetFirewallTemplateArgs, opts ...InvokeOption) (*GetFirewallTemplateResult, error)
    func GetFirewallTemplateOutput(ctx *Context, args *GetFirewallTemplateOutputArgs, opts ...InvokeOption) GetFirewallTemplateResultOutput

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

    public static class GetFirewallTemplate 
    {
        public static Task<GetFirewallTemplateResult> InvokeAsync(GetFirewallTemplateArgs args, InvokeOptions? opts = null)
        public static Output<GetFirewallTemplateResult> Invoke(GetFirewallTemplateInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetFirewallTemplateResult> getFirewallTemplate(GetFirewallTemplateArgs args, InvokeOptions options)
    public static Output<GetFirewallTemplateResult> getFirewallTemplate(GetFirewallTemplateArgs args, InvokeOptions options)
    
    fn::invoke:
      function: linode:index/getFirewallTemplate:getFirewallTemplate
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Slug string
    The slug of the firewall template.
    Slug string
    The slug of the firewall template.
    slug String
    The slug of the firewall template.
    slug string
    The slug of the firewall template.
    slug str
    The slug of the firewall template.
    slug String
    The slug of the firewall template.

    getFirewallTemplate Result

    The following output properties are available:

    Id string
    The computed ID of the data source, which matches the slug attribute.
    InboundPolicy string
    The default behavior for inbound traffic. This can be overridden by individual firewall rules.
    Inbounds List<GetFirewallTemplateInbound>
    A list of firewall rules specifying allowed inbound network traffic.
    OutboundPolicy string
    The default behavior for outbound traffic. This can be overridden by individual firewall rules.
    Outbounds List<GetFirewallTemplateOutbound>
    A list of firewall rules specifying allowed outbound network traffic.
    Slug string
    Id string
    The computed ID of the data source, which matches the slug attribute.
    InboundPolicy string
    The default behavior for inbound traffic. This can be overridden by individual firewall rules.
    Inbounds []GetFirewallTemplateInbound
    A list of firewall rules specifying allowed inbound network traffic.
    OutboundPolicy string
    The default behavior for outbound traffic. This can be overridden by individual firewall rules.
    Outbounds []GetFirewallTemplateOutbound
    A list of firewall rules specifying allowed outbound network traffic.
    Slug string
    id String
    The computed ID of the data source, which matches the slug attribute.
    inboundPolicy String
    The default behavior for inbound traffic. This can be overridden by individual firewall rules.
    inbounds List<GetFirewallTemplateInbound>
    A list of firewall rules specifying allowed inbound network traffic.
    outboundPolicy String
    The default behavior for outbound traffic. This can be overridden by individual firewall rules.
    outbounds List<GetFirewallTemplateOutbound>
    A list of firewall rules specifying allowed outbound network traffic.
    slug String
    id string
    The computed ID of the data source, which matches the slug attribute.
    inboundPolicy string
    The default behavior for inbound traffic. This can be overridden by individual firewall rules.
    inbounds GetFirewallTemplateInbound[]
    A list of firewall rules specifying allowed inbound network traffic.
    outboundPolicy string
    The default behavior for outbound traffic. This can be overridden by individual firewall rules.
    outbounds GetFirewallTemplateOutbound[]
    A list of firewall rules specifying allowed outbound network traffic.
    slug string
    id str
    The computed ID of the data source, which matches the slug attribute.
    inbound_policy str
    The default behavior for inbound traffic. This can be overridden by individual firewall rules.
    inbounds Sequence[GetFirewallTemplateInbound]
    A list of firewall rules specifying allowed inbound network traffic.
    outbound_policy str
    The default behavior for outbound traffic. This can be overridden by individual firewall rules.
    outbounds Sequence[GetFirewallTemplateOutbound]
    A list of firewall rules specifying allowed outbound network traffic.
    slug str
    id String
    The computed ID of the data source, which matches the slug attribute.
    inboundPolicy String
    The default behavior for inbound traffic. This can be overridden by individual firewall rules.
    inbounds List<Property Map>
    A list of firewall rules specifying allowed inbound network traffic.
    outboundPolicy String
    The default behavior for outbound traffic. This can be overridden by individual firewall rules.
    outbounds List<Property Map>
    A list of firewall rules specifying allowed outbound network traffic.
    slug String

    Supporting Types

    GetFirewallTemplateInbound

    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 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

    GetFirewallTemplateOutbound

    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 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 v5.6.0 published on Wednesday, Dec 24, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate