1. Packages
  2. Panos Provider
  3. API Docs
  4. TemplateStack
panos 2.0.0 published on Tuesday, Apr 15, 2025 by paloaltonetworks

panos.TemplateStack

Explore with Pulumi AI

Example Usage

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

const exampleTemplate = new panos.Template("exampleTemplate", {
    location: {
        panorama: {},
    },
    description: "example template stack",
});
const exampleTemplateStack = new panos.TemplateStack("exampleTemplateStack", {
    location: {
        panorama: {},
    },
    description: "example template stack",
    templates: [exampleTemplate.name],
});
Copy
import pulumi
import pulumi_panos as panos

example_template = panos.Template("exampleTemplate",
    location={
        "panorama": {},
    },
    description="example template stack")
example_template_stack = panos.TemplateStack("exampleTemplateStack",
    location={
        "panorama": {},
    },
    description="example template stack",
    templates=[example_template.name])
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/panos/v2/panos"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleTemplate, err := panos.NewTemplate(ctx, "exampleTemplate", &panos.TemplateArgs{
			Location: &panos.TemplateLocationArgs{
				Panorama: &panos.TemplateLocationPanoramaArgs{},
			},
			Description: pulumi.String("example template stack"),
		})
		if err != nil {
			return err
		}
		_, err = panos.NewTemplateStack(ctx, "exampleTemplateStack", &panos.TemplateStackArgs{
			Location: &panos.TemplateStackLocationArgs{
				Panorama: &panos.TemplateStackLocationPanoramaArgs{},
			},
			Description: pulumi.String("example template stack"),
			Templates: pulumi.StringArray{
				exampleTemplate.Name,
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Panos = Pulumi.Panos;

return await Deployment.RunAsync(() => 
{
    var exampleTemplate = new Panos.Template("exampleTemplate", new()
    {
        Location = new Panos.Inputs.TemplateLocationArgs
        {
            Panorama = null,
        },
        Description = "example template stack",
    });

    var exampleTemplateStack = new Panos.TemplateStack("exampleTemplateStack", new()
    {
        Location = new Panos.Inputs.TemplateStackLocationArgs
        {
            Panorama = null,
        },
        Description = "example template stack",
        Templates = new[]
        {
            exampleTemplate.Name,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.panos.Template;
import com.pulumi.panos.TemplateArgs;
import com.pulumi.panos.inputs.TemplateLocationArgs;
import com.pulumi.panos.inputs.TemplateLocationPanoramaArgs;
import com.pulumi.panos.TemplateStack;
import com.pulumi.panos.TemplateStackArgs;
import com.pulumi.panos.inputs.TemplateStackLocationArgs;
import com.pulumi.panos.inputs.TemplateStackLocationPanoramaArgs;
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 exampleTemplate = new Template("exampleTemplate", TemplateArgs.builder()
            .location(TemplateLocationArgs.builder()
                .panorama()
                .build())
            .description("example template stack")
            .build());

        var exampleTemplateStack = new TemplateStack("exampleTemplateStack", TemplateStackArgs.builder()
            .location(TemplateStackLocationArgs.builder()
                .panorama()
                .build())
            .description("example template stack")
            .templates(exampleTemplate.name())
            .build());

    }
}
Copy
resources:
  exampleTemplateStack:
    type: panos:TemplateStack
    properties:
      location:
        panorama: {}
      description: example template stack
      templates:
        - ${exampleTemplate.name}
  exampleTemplate:
    type: panos:Template
    properties:
      location:
        panorama: {}
      description: example template stack
Copy

Create TemplateStack Resource

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

Constructor syntax

new TemplateStack(name: string, args: TemplateStackArgs, opts?: CustomResourceOptions);
@overload
def TemplateStack(resource_name: str,
                  args: TemplateStackArgs,
                  opts: Optional[ResourceOptions] = None)

@overload
def TemplateStack(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  location: Optional[TemplateStackLocationArgs] = None,
                  default_vsys: Optional[str] = None,
                  description: Optional[str] = None,
                  devices: Optional[Sequence[str]] = None,
                  name: Optional[str] = None,
                  templates: Optional[Sequence[str]] = None,
                  user_group_source: Optional[TemplateStackUserGroupSourceArgs] = None)
func NewTemplateStack(ctx *Context, name string, args TemplateStackArgs, opts ...ResourceOption) (*TemplateStack, error)
public TemplateStack(string name, TemplateStackArgs args, CustomResourceOptions? opts = null)
public TemplateStack(String name, TemplateStackArgs args)
public TemplateStack(String name, TemplateStackArgs args, CustomResourceOptions options)
type: panos:TemplateStack
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. TemplateStackArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. TemplateStackArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. TemplateStackArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. TemplateStackArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. TemplateStackArgs
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 templateStackResource = new Panos.TemplateStack("templateStackResource", new()
{
    Location = new Panos.Inputs.TemplateStackLocationArgs
    {
        Panorama = new Panos.Inputs.TemplateStackLocationPanoramaArgs
        {
            PanoramaDevice = "string",
        },
    },
    DefaultVsys = "string",
    Description = "string",
    Devices = new[]
    {
        "string",
    },
    Name = "string",
    Templates = new[]
    {
        "string",
    },
    UserGroupSource = new Panos.Inputs.TemplateStackUserGroupSourceArgs
    {
        MasterDevice = "string",
    },
});
Copy
example, err := panos.NewTemplateStack(ctx, "templateStackResource", &panos.TemplateStackArgs{
	Location: &panos.TemplateStackLocationArgs{
		Panorama: &panos.TemplateStackLocationPanoramaArgs{
			PanoramaDevice: pulumi.String("string"),
		},
	},
	DefaultVsys: pulumi.String("string"),
	Description: pulumi.String("string"),
	Devices: pulumi.StringArray{
		pulumi.String("string"),
	},
	Name: pulumi.String("string"),
	Templates: pulumi.StringArray{
		pulumi.String("string"),
	},
	UserGroupSource: &panos.TemplateStackUserGroupSourceArgs{
		MasterDevice: pulumi.String("string"),
	},
})
Copy
var templateStackResource = new TemplateStack("templateStackResource", TemplateStackArgs.builder()
    .location(TemplateStackLocationArgs.builder()
        .panorama(TemplateStackLocationPanoramaArgs.builder()
            .panoramaDevice("string")
            .build())
        .build())
    .defaultVsys("string")
    .description("string")
    .devices("string")
    .name("string")
    .templates("string")
    .userGroupSource(TemplateStackUserGroupSourceArgs.builder()
        .masterDevice("string")
        .build())
    .build());
Copy
template_stack_resource = panos.TemplateStack("templateStackResource",
    location={
        "panorama": {
            "panorama_device": "string",
        },
    },
    default_vsys="string",
    description="string",
    devices=["string"],
    name="string",
    templates=["string"],
    user_group_source={
        "master_device": "string",
    })
Copy
const templateStackResource = new panos.TemplateStack("templateStackResource", {
    location: {
        panorama: {
            panoramaDevice: "string",
        },
    },
    defaultVsys: "string",
    description: "string",
    devices: ["string"],
    name: "string",
    templates: ["string"],
    userGroupSource: {
        masterDevice: "string",
    },
});
Copy
type: panos:TemplateStack
properties:
    defaultVsys: string
    description: string
    devices:
        - string
    location:
        panorama:
            panoramaDevice: string
    name: string
    templates:
        - string
    userGroupSource:
        masterDevice: string
Copy

TemplateStack 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 TemplateStack resource accepts the following input properties:

Location This property is required. TemplateStackLocation
The location of this object.
DefaultVsys string
Default virtual system
Description string
The description.
Devices List<string>
List of devices
Name string
The name of the service.
Templates List<string>
List of templates
UserGroupSource TemplateStackUserGroupSource
Location This property is required. TemplateStackLocationArgs
The location of this object.
DefaultVsys string
Default virtual system
Description string
The description.
Devices []string
List of devices
Name string
The name of the service.
Templates []string
List of templates
UserGroupSource TemplateStackUserGroupSourceArgs
location This property is required. TemplateStackLocation
The location of this object.
defaultVsys String
Default virtual system
description String
The description.
devices List<String>
List of devices
name String
The name of the service.
templates List<String>
List of templates
userGroupSource TemplateStackUserGroupSource
location This property is required. TemplateStackLocation
The location of this object.
defaultVsys string
Default virtual system
description string
The description.
devices string[]
List of devices
name string
The name of the service.
templates string[]
List of templates
userGroupSource TemplateStackUserGroupSource
location This property is required. TemplateStackLocationArgs
The location of this object.
default_vsys str
Default virtual system
description str
The description.
devices Sequence[str]
List of devices
name str
The name of the service.
templates Sequence[str]
List of templates
user_group_source TemplateStackUserGroupSourceArgs
location This property is required. Property Map
The location of this object.
defaultVsys String
Default virtual system
description String
The description.
devices List<String>
List of devices
name String
The name of the service.
templates List<String>
List of templates
userGroupSource Property Map

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing TemplateStack Resource

Get an existing TemplateStack 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?: TemplateStackState, opts?: CustomResourceOptions): TemplateStack
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        default_vsys: Optional[str] = None,
        description: Optional[str] = None,
        devices: Optional[Sequence[str]] = None,
        location: Optional[TemplateStackLocationArgs] = None,
        name: Optional[str] = None,
        templates: Optional[Sequence[str]] = None,
        user_group_source: Optional[TemplateStackUserGroupSourceArgs] = None) -> TemplateStack
func GetTemplateStack(ctx *Context, name string, id IDInput, state *TemplateStackState, opts ...ResourceOption) (*TemplateStack, error)
public static TemplateStack Get(string name, Input<string> id, TemplateStackState? state, CustomResourceOptions? opts = null)
public static TemplateStack get(String name, Output<String> id, TemplateStackState state, CustomResourceOptions options)
resources:  _:    type: panos:TemplateStack    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
DefaultVsys string
Default virtual system
Description string
The description.
Devices List<string>
List of devices
Location TemplateStackLocation
The location of this object.
Name string
The name of the service.
Templates List<string>
List of templates
UserGroupSource TemplateStackUserGroupSource
DefaultVsys string
Default virtual system
Description string
The description.
Devices []string
List of devices
Location TemplateStackLocationArgs
The location of this object.
Name string
The name of the service.
Templates []string
List of templates
UserGroupSource TemplateStackUserGroupSourceArgs
defaultVsys String
Default virtual system
description String
The description.
devices List<String>
List of devices
location TemplateStackLocation
The location of this object.
name String
The name of the service.
templates List<String>
List of templates
userGroupSource TemplateStackUserGroupSource
defaultVsys string
Default virtual system
description string
The description.
devices string[]
List of devices
location TemplateStackLocation
The location of this object.
name string
The name of the service.
templates string[]
List of templates
userGroupSource TemplateStackUserGroupSource
default_vsys str
Default virtual system
description str
The description.
devices Sequence[str]
List of devices
location TemplateStackLocationArgs
The location of this object.
name str
The name of the service.
templates Sequence[str]
List of templates
user_group_source TemplateStackUserGroupSourceArgs
defaultVsys String
Default virtual system
description String
The description.
devices List<String>
List of devices
location Property Map
The location of this object.
name String
The name of the service.
templates List<String>
List of templates
userGroupSource Property Map

Supporting Types

TemplateStackLocation
, TemplateStackLocationArgs

Panorama TemplateStackLocationPanorama
Located in a specific Panorama.
Panorama TemplateStackLocationPanorama
Located in a specific Panorama.
panorama TemplateStackLocationPanorama
Located in a specific Panorama.
panorama TemplateStackLocationPanorama
Located in a specific Panorama.
panorama TemplateStackLocationPanorama
Located in a specific Panorama.
panorama Property Map
Located in a specific Panorama.

TemplateStackLocationPanorama
, TemplateStackLocationPanoramaArgs

PanoramaDevice string
The Panorama device.
PanoramaDevice string
The Panorama device.
panoramaDevice String
The Panorama device.
panoramaDevice string
The Panorama device.
panorama_device str
The Panorama device.
panoramaDevice String
The Panorama device.

TemplateStackUserGroupSource
, TemplateStackUserGroupSourceArgs

Package Details

Repository
panos paloaltonetworks/terraform-provider-panos
License
Notes
This Pulumi package is based on the panos Terraform Provider.