published on Tuesday, Apr 28, 2026 by paloaltonetworks
published on Tuesday, Apr 28, 2026 by paloaltonetworks
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as panos from "@pulumi/panos";
const example = new panos.Template("example", {
location: {
panorama: {},
},
name: "my-template",
});
const exampleVirtualRouter = new panos.VirtualRouter("example", {
location: {
template: {
name: example.name,
},
},
name: "vr-1",
});
const exampleEthernetInterface = new panos.EthernetInterface("example", {
location: {
template: {
name: example.name,
},
},
name: "ethernet1/1",
layer3: {
ips: [{
name: "10.1.1.1/24",
}],
},
});
const exampleVirtualRouterInterface = new panos.VirtualRouterInterface("example", {
location: {
template: {
name: example.name,
},
},
virtualRouter: exampleVirtualRouter.name,
"interface": exampleEthernetInterface.name,
});
import pulumi
import pulumi_panos as panos
example = panos.Template("example",
location={
"panorama": {},
},
name="my-template")
example_virtual_router = panos.VirtualRouter("example",
location={
"template": {
"name": example.name,
},
},
name="vr-1")
example_ethernet_interface = panos.EthernetInterface("example",
location={
"template": {
"name": example.name,
},
},
name="ethernet1/1",
layer3={
"ips": [{
"name": "10.1.1.1/24",
}],
})
example_virtual_router_interface = panos.VirtualRouterInterface("example",
location={
"template": {
"name": example.name,
},
},
virtual_router=example_virtual_router.name,
interface=example_ethernet_interface.name)
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 {
example, err := panos.NewTemplate(ctx, "example", &panos.TemplateArgs{
Location: &panos.TemplateLocationArgs{
Panorama: &panos.TemplateLocationPanoramaArgs{},
},
Name: pulumi.String("my-template"),
})
if err != nil {
return err
}
exampleVirtualRouter, err := panos.NewVirtualRouter(ctx, "example", &panos.VirtualRouterArgs{
Location: &panos.VirtualRouterLocationArgs{
Template: &panos.VirtualRouterLocationTemplateArgs{
Name: example.Name,
},
},
Name: pulumi.String("vr-1"),
})
if err != nil {
return err
}
exampleEthernetInterface, err := panos.NewEthernetInterface(ctx, "example", &panos.EthernetInterfaceArgs{
Location: &panos.EthernetInterfaceLocationArgs{
Template: &panos.EthernetInterfaceLocationTemplateArgs{
Name: example.Name,
},
},
Name: pulumi.String("ethernet1/1"),
Layer3: &panos.EthernetInterfaceLayer3Args{
Ips: panos.EthernetInterfaceLayer3IpArray{
&panos.EthernetInterfaceLayer3IpArgs{
Name: pulumi.String("10.1.1.1/24"),
},
},
},
})
if err != nil {
return err
}
_, err = panos.NewVirtualRouterInterface(ctx, "example", &panos.VirtualRouterInterfaceArgs{
Location: &panos.VirtualRouterInterfaceLocationArgs{
Template: &panos.VirtualRouterInterfaceLocationTemplateArgs{
Name: example.Name,
},
},
VirtualRouter: exampleVirtualRouter.Name,
Interface: exampleEthernetInterface.Name,
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Panos = Pulumi.Panos;
return await Deployment.RunAsync(() =>
{
var example = new Panos.Template("example", new()
{
Location = new Panos.Inputs.TemplateLocationArgs
{
Panorama = null,
},
Name = "my-template",
});
var exampleVirtualRouter = new Panos.VirtualRouter("example", new()
{
Location = new Panos.Inputs.VirtualRouterLocationArgs
{
Template = new Panos.Inputs.VirtualRouterLocationTemplateArgs
{
Name = example.Name,
},
},
Name = "vr-1",
});
var exampleEthernetInterface = new Panos.EthernetInterface("example", new()
{
Location = new Panos.Inputs.EthernetInterfaceLocationArgs
{
Template = new Panos.Inputs.EthernetInterfaceLocationTemplateArgs
{
Name = example.Name,
},
},
Name = "ethernet1/1",
Layer3 = new Panos.Inputs.EthernetInterfaceLayer3Args
{
Ips = new[]
{
new Panos.Inputs.EthernetInterfaceLayer3IpArgs
{
Name = "10.1.1.1/24",
},
},
},
});
var exampleVirtualRouterInterface = new Panos.VirtualRouterInterface("example", new()
{
Location = new Panos.Inputs.VirtualRouterInterfaceLocationArgs
{
Template = new Panos.Inputs.VirtualRouterInterfaceLocationTemplateArgs
{
Name = example.Name,
},
},
VirtualRouter = exampleVirtualRouter.Name,
Interface = exampleEthernetInterface.Name,
});
});
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.VirtualRouter;
import com.pulumi.panos.VirtualRouterArgs;
import com.pulumi.panos.inputs.VirtualRouterLocationArgs;
import com.pulumi.panos.inputs.VirtualRouterLocationTemplateArgs;
import com.pulumi.panos.EthernetInterface;
import com.pulumi.panos.EthernetInterfaceArgs;
import com.pulumi.panos.inputs.EthernetInterfaceLocationArgs;
import com.pulumi.panos.inputs.EthernetInterfaceLocationTemplateArgs;
import com.pulumi.panos.inputs.EthernetInterfaceLayer3Args;
import com.pulumi.panos.VirtualRouterInterface;
import com.pulumi.panos.VirtualRouterInterfaceArgs;
import com.pulumi.panos.inputs.VirtualRouterInterfaceLocationArgs;
import com.pulumi.panos.inputs.VirtualRouterInterfaceLocationTemplateArgs;
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 example = new Template("example", TemplateArgs.builder()
.location(TemplateLocationArgs.builder()
.panorama(TemplateLocationPanoramaArgs.builder()
.build())
.build())
.name("my-template")
.build());
var exampleVirtualRouter = new VirtualRouter("exampleVirtualRouter", VirtualRouterArgs.builder()
.location(VirtualRouterLocationArgs.builder()
.template(VirtualRouterLocationTemplateArgs.builder()
.name(example.name())
.build())
.build())
.name("vr-1")
.build());
var exampleEthernetInterface = new EthernetInterface("exampleEthernetInterface", EthernetInterfaceArgs.builder()
.location(EthernetInterfaceLocationArgs.builder()
.template(EthernetInterfaceLocationTemplateArgs.builder()
.name(example.name())
.build())
.build())
.name("ethernet1/1")
.layer3(EthernetInterfaceLayer3Args.builder()
.ips(EthernetInterfaceLayer3IpArgs.builder()
.name("10.1.1.1/24")
.build())
.build())
.build());
var exampleVirtualRouterInterface = new VirtualRouterInterface("exampleVirtualRouterInterface", VirtualRouterInterfaceArgs.builder()
.location(VirtualRouterInterfaceLocationArgs.builder()
.template(VirtualRouterInterfaceLocationTemplateArgs.builder()
.name(example.name())
.build())
.build())
.virtualRouter(exampleVirtualRouter.name())
.interface_(exampleEthernetInterface.name())
.build());
}
}
resources:
example:
type: panos:Template
properties:
location:
panorama: {}
name: my-template
exampleVirtualRouter:
type: panos:VirtualRouter
name: example
properties:
location:
template:
name: ${example.name}
name: vr-1
exampleEthernetInterface:
type: panos:EthernetInterface
name: example
properties:
location:
template:
name: ${example.name}
name: ethernet1/1
layer3:
ips:
- name: 10.1.1.1/24
exampleVirtualRouterInterface:
type: panos:VirtualRouterInterface
name: example
properties:
location:
template:
name: ${example.name}
virtualRouter: ${exampleVirtualRouter.name}
interface: ${exampleEthernetInterface.name}
Create VirtualRouterInterface Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new VirtualRouterInterface(name: string, args: VirtualRouterInterfaceArgs, opts?: CustomResourceOptions);@overload
def VirtualRouterInterface(resource_name: str,
args: VirtualRouterInterfaceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def VirtualRouterInterface(resource_name: str,
opts: Optional[ResourceOptions] = None,
interface: Optional[str] = None,
location: Optional[VirtualRouterInterfaceLocationArgs] = None,
virtual_router: Optional[str] = None)func NewVirtualRouterInterface(ctx *Context, name string, args VirtualRouterInterfaceArgs, opts ...ResourceOption) (*VirtualRouterInterface, error)public VirtualRouterInterface(string name, VirtualRouterInterfaceArgs args, CustomResourceOptions? opts = null)
public VirtualRouterInterface(String name, VirtualRouterInterfaceArgs args)
public VirtualRouterInterface(String name, VirtualRouterInterfaceArgs args, CustomResourceOptions options)
type: panos:VirtualRouterInterface
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args VirtualRouterInterfaceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args VirtualRouterInterfaceArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args VirtualRouterInterfaceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VirtualRouterInterfaceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args VirtualRouterInterfaceArgs
- 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 virtualRouterInterfaceResource = new Panos.VirtualRouterInterface("virtualRouterInterfaceResource", new()
{
Interface = "string",
Location = new Panos.Inputs.VirtualRouterInterfaceLocationArgs
{
Ngfw = new Panos.Inputs.VirtualRouterInterfaceLocationNgfwArgs
{
NgfwDevice = "string",
},
Template = new Panos.Inputs.VirtualRouterInterfaceLocationTemplateArgs
{
Name = "string",
NgfwDevice = "string",
PanoramaDevice = "string",
},
TemplateStack = new Panos.Inputs.VirtualRouterInterfaceLocationTemplateStackArgs
{
Name = "string",
NgfwDevice = "string",
PanoramaDevice = "string",
},
Vsys = new Panos.Inputs.VirtualRouterInterfaceLocationVsysArgs
{
Name = "string",
NgfwDevice = "string",
},
},
VirtualRouter = "string",
});
example, err := panos.NewVirtualRouterInterface(ctx, "virtualRouterInterfaceResource", &panos.VirtualRouterInterfaceArgs{
Interface: pulumi.String("string"),
Location: &panos.VirtualRouterInterfaceLocationArgs{
Ngfw: &panos.VirtualRouterInterfaceLocationNgfwArgs{
NgfwDevice: pulumi.String("string"),
},
Template: &panos.VirtualRouterInterfaceLocationTemplateArgs{
Name: pulumi.String("string"),
NgfwDevice: pulumi.String("string"),
PanoramaDevice: pulumi.String("string"),
},
TemplateStack: &panos.VirtualRouterInterfaceLocationTemplateStackArgs{
Name: pulumi.String("string"),
NgfwDevice: pulumi.String("string"),
PanoramaDevice: pulumi.String("string"),
},
Vsys: &panos.VirtualRouterInterfaceLocationVsysArgs{
Name: pulumi.String("string"),
NgfwDevice: pulumi.String("string"),
},
},
VirtualRouter: pulumi.String("string"),
})
var virtualRouterInterfaceResource = new VirtualRouterInterface("virtualRouterInterfaceResource", VirtualRouterInterfaceArgs.builder()
.interface_("string")
.location(VirtualRouterInterfaceLocationArgs.builder()
.ngfw(VirtualRouterInterfaceLocationNgfwArgs.builder()
.ngfwDevice("string")
.build())
.template(VirtualRouterInterfaceLocationTemplateArgs.builder()
.name("string")
.ngfwDevice("string")
.panoramaDevice("string")
.build())
.templateStack(VirtualRouterInterfaceLocationTemplateStackArgs.builder()
.name("string")
.ngfwDevice("string")
.panoramaDevice("string")
.build())
.vsys(VirtualRouterInterfaceLocationVsysArgs.builder()
.name("string")
.ngfwDevice("string")
.build())
.build())
.virtualRouter("string")
.build());
virtual_router_interface_resource = panos.VirtualRouterInterface("virtualRouterInterfaceResource",
interface="string",
location={
"ngfw": {
"ngfw_device": "string",
},
"template": {
"name": "string",
"ngfw_device": "string",
"panorama_device": "string",
},
"template_stack": {
"name": "string",
"ngfw_device": "string",
"panorama_device": "string",
},
"vsys": {
"name": "string",
"ngfw_device": "string",
},
},
virtual_router="string")
const virtualRouterInterfaceResource = new panos.VirtualRouterInterface("virtualRouterInterfaceResource", {
"interface": "string",
location: {
ngfw: {
ngfwDevice: "string",
},
template: {
name: "string",
ngfwDevice: "string",
panoramaDevice: "string",
},
templateStack: {
name: "string",
ngfwDevice: "string",
panoramaDevice: "string",
},
vsys: {
name: "string",
ngfwDevice: "string",
},
},
virtualRouter: "string",
});
type: panos:VirtualRouterInterface
properties:
interface: string
location:
ngfw:
ngfwDevice: string
template:
name: string
ngfwDevice: string
panoramaDevice: string
templateStack:
name: string
ngfwDevice: string
panoramaDevice: string
vsys:
name: string
ngfwDevice: string
virtualRouter: string
VirtualRouterInterface 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 VirtualRouterInterface resource accepts the following input properties:
- Interface string
- Location
Virtual
Router Interface Location - The location of this object.
- Virtual
Router string
- Interface string
- Location
Virtual
Router Interface Location Args - The location of this object.
- Virtual
Router string
- interface_ String
- location
Virtual
Router Interface Location - The location of this object.
- virtual
Router String
- interface string
- location
Virtual
Router Interface Location - The location of this object.
- virtual
Router string
- interface str
- location
Virtual
Router Interface Location Args - The location of this object.
- virtual_
router str
- interface String
- location Property Map
- The location of this object.
- virtual
Router String
Outputs
All input properties are implicitly available as output properties. Additionally, the VirtualRouterInterface 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 VirtualRouterInterface Resource
Get an existing VirtualRouterInterface 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?: VirtualRouterInterfaceState, opts?: CustomResourceOptions): VirtualRouterInterface@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
interface: Optional[str] = None,
location: Optional[VirtualRouterInterfaceLocationArgs] = None,
virtual_router: Optional[str] = None) -> VirtualRouterInterfacefunc GetVirtualRouterInterface(ctx *Context, name string, id IDInput, state *VirtualRouterInterfaceState, opts ...ResourceOption) (*VirtualRouterInterface, error)public static VirtualRouterInterface Get(string name, Input<string> id, VirtualRouterInterfaceState? state, CustomResourceOptions? opts = null)public static VirtualRouterInterface get(String name, Output<String> id, VirtualRouterInterfaceState state, CustomResourceOptions options)resources: _: type: panos:VirtualRouterInterface get: id: ${id}- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- Interface string
- Location
Virtual
Router Interface Location - The location of this object.
- Virtual
Router string
- Interface string
- Location
Virtual
Router Interface Location Args - The location of this object.
- Virtual
Router string
- interface_ String
- location
Virtual
Router Interface Location - The location of this object.
- virtual
Router String
- interface string
- location
Virtual
Router Interface Location - The location of this object.
- virtual
Router string
- interface str
- location
Virtual
Router Interface Location Args - The location of this object.
- virtual_
router str
- interface String
- location Property Map
- The location of this object.
- virtual
Router String
Supporting Types
VirtualRouterInterfaceLocation, VirtualRouterInterfaceLocationArgs
- Ngfw
Virtual
Router Interface Location Ngfw - Located in a specific NGFW device
- Template
Virtual
Router Interface Location Template - Located in a specific template
- Template
Stack VirtualRouter Interface Location Template Stack - Located in a specific template stack
- Vsys
Virtual
Router Interface Location Vsys - Located in a specific Virtual System
- Ngfw
Virtual
Router Interface Location Ngfw - Located in a specific NGFW device
- Template
Virtual
Router Interface Location Template - Located in a specific template
- Template
Stack VirtualRouter Interface Location Template Stack - Located in a specific template stack
- Vsys
Virtual
Router Interface Location Vsys - Located in a specific Virtual System
- ngfw
Virtual
Router Interface Location Ngfw - Located in a specific NGFW device
- template
Virtual
Router Interface Location Template - Located in a specific template
- template
Stack VirtualRouter Interface Location Template Stack - Located in a specific template stack
- vsys
Virtual
Router Interface Location Vsys - Located in a specific Virtual System
- ngfw
Virtual
Router Interface Location Ngfw - Located in a specific NGFW device
- template
Virtual
Router Interface Location Template - Located in a specific template
- template
Stack VirtualRouter Interface Location Template Stack - Located in a specific template stack
- vsys
Virtual
Router Interface Location Vsys - Located in a specific Virtual System
- ngfw
Virtual
Router Interface Location Ngfw - Located in a specific NGFW device
- template
Virtual
Router Interface Location Template - Located in a specific template
- template_
stack VirtualRouter Interface Location Template Stack - Located in a specific template stack
- vsys
Virtual
Router Interface Location Vsys - Located in a specific Virtual System
- ngfw Property Map
- Located in a specific NGFW device
- template Property Map
- Located in a specific template
- template
Stack Property Map - Located in a specific template stack
- vsys Property Map
- Located in a specific Virtual System
VirtualRouterInterfaceLocationNgfw, VirtualRouterInterfaceLocationNgfwArgs
- Ngfw
Device string - The NGFW device
- Ngfw
Device string - The NGFW device
- ngfw
Device String - The NGFW device
- ngfw
Device string - The NGFW device
- ngfw_
device str - The NGFW device
- ngfw
Device String - The NGFW device
VirtualRouterInterfaceLocationTemplate, VirtualRouterInterfaceLocationTemplateArgs
- Name string
- Specific Panorama template
- Ngfw
Device string - The NGFW device
- Panorama
Device string - Specific Panorama device
- Name string
- Specific Panorama template
- Ngfw
Device string - The NGFW device
- Panorama
Device string - Specific Panorama device
- name String
- Specific Panorama template
- ngfw
Device String - The NGFW device
- panorama
Device String - Specific Panorama device
- name string
- Specific Panorama template
- ngfw
Device string - The NGFW device
- panorama
Device string - Specific Panorama device
- name str
- Specific Panorama template
- ngfw_
device str - The NGFW device
- panorama_
device str - Specific Panorama device
- name String
- Specific Panorama template
- ngfw
Device String - The NGFW device
- panorama
Device String - Specific Panorama device
VirtualRouterInterfaceLocationTemplateStack, VirtualRouterInterfaceLocationTemplateStackArgs
- Name string
- Specific Panorama template stack
- Ngfw
Device string - The NGFW device
- Panorama
Device string - Specific Panorama device
- Name string
- Specific Panorama template stack
- Ngfw
Device string - The NGFW device
- Panorama
Device string - Specific Panorama device
- name String
- Specific Panorama template stack
- ngfw
Device String - The NGFW device
- panorama
Device String - Specific Panorama device
- name string
- Specific Panorama template stack
- ngfw
Device string - The NGFW device
- panorama
Device string - Specific Panorama device
- name str
- Specific Panorama template stack
- ngfw_
device str - The NGFW device
- panorama_
device str - Specific Panorama device
- name String
- Specific Panorama template stack
- ngfw
Device String - The NGFW device
- panorama
Device String - Specific Panorama device
VirtualRouterInterfaceLocationVsys, VirtualRouterInterfaceLocationVsysArgs
- Name string
- The Virtual System name
- Ngfw
Device string - The NGFW device name
- Name string
- The Virtual System name
- Ngfw
Device string - The NGFW device name
- name String
- The Virtual System name
- ngfw
Device String - The NGFW device name
- name string
- The Virtual System name
- ngfw
Device string - The NGFW device name
- name str
- The Virtual System name
- ngfw_
device str - The NGFW device name
- name String
- The Virtual System name
- ngfw
Device String - The NGFW device name
Package Details
- Repository
- panos paloaltonetworks/terraform-provider-panos
- License
- Notes
- This Pulumi package is based on the
panosTerraform Provider.
published on Tuesday, Apr 28, 2026 by paloaltonetworks
