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 dictionaryThe 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
slugattribute. - Inbound
Policy string - The default behavior for inbound traffic. This can be overridden by individual firewall rules.
- Inbounds
List<Get
Firewall Template Inbound> - A list of firewall rules specifying allowed inbound network traffic.
- Outbound
Policy string - The default behavior for outbound traffic. This can be overridden by individual firewall rules.
- Outbounds
List<Get
Firewall Template Outbound> - A list of firewall rules specifying allowed outbound network traffic.
- Slug string
- Id string
- The computed ID of the data source, which matches the
slugattribute. - Inbound
Policy string - The default behavior for inbound traffic. This can be overridden by individual firewall rules.
- Inbounds
[]Get
Firewall Template Inbound - A list of firewall rules specifying allowed inbound network traffic.
- Outbound
Policy string - The default behavior for outbound traffic. This can be overridden by individual firewall rules.
- Outbounds
[]Get
Firewall Template Outbound - A list of firewall rules specifying allowed outbound network traffic.
- Slug string
- id String
- The computed ID of the data source, which matches the
slugattribute. - inbound
Policy String - The default behavior for inbound traffic. This can be overridden by individual firewall rules.
- inbounds
List<Get
Firewall Template Inbound> - A list of firewall rules specifying allowed inbound network traffic.
- outbound
Policy String - The default behavior for outbound traffic. This can be overridden by individual firewall rules.
- outbounds
List<Get
Firewall Template Outbound> - A list of firewall rules specifying allowed outbound network traffic.
- slug String
- id string
- The computed ID of the data source, which matches the
slugattribute. - inbound
Policy string - The default behavior for inbound traffic. This can be overridden by individual firewall rules.
- inbounds
Get
Firewall Template Inbound[] - A list of firewall rules specifying allowed inbound network traffic.
- outbound
Policy string - The default behavior for outbound traffic. This can be overridden by individual firewall rules.
- outbounds
Get
Firewall Template Outbound[] - A list of firewall rules specifying allowed outbound network traffic.
- slug string
- id str
- The computed ID of the data source, which matches the
slugattribute. - inbound_
policy str - The default behavior for inbound traffic. This can be overridden by individual firewall rules.
- inbounds
Sequence[Get
Firewall Template Inbound] - 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[Get
Firewall Template Outbound] - A list of firewall rules specifying allowed outbound network traffic.
- slug str
- id String
- The computed ID of the data source, which matches the
slugattribute. - inbound
Policy 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.
- outbound
Policy 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
GetFirewallTemplateOutbound
Package Details
- Repository
- Linode pulumi/pulumi-linode
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
linodeTerraform Provider.
