1. Packages
  2. Strata Cloud Manager Provider
  3. API Docs
  4. Layer2Subinterface
Strata Cloud Manager v0.4.3 published on Saturday, Nov 8, 2025 by Pulumi
scm logo
Strata Cloud Manager v0.4.3 published on Saturday, Nov 8, 2025 by Pulumi

    Layer2Subinterface resource

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as scm from "@pulumi/scm";
    
    //
    // Creates a ethernet interface used as parent-interface for subsequent examples
    //
    const scmParentInterface = new scm.EthernetInterface("scm_parent_interface", {
        name: "$scm_parent_interface",
        comment: "Managed by Pulumi",
        folder: "ngfw-shared",
        layer2: {},
    });
    //
    // Creates a layer2 sub-interface with vlan tag 100
    //
    const scmLayer2Subinterface = new scm.Layer2Subinterface("scm_layer2_subinterface", {
        name: "$scm_parent_interface.100",
        comment: "Managed by Pulumi",
        folder: "ngfw-shared",
        vlanTag: "100",
        parentInterface: "$scm_parent_interface",
    }, {
        dependsOn: [scmParentInterface],
    });
    
    import pulumi
    import pulumi_scm as scm
    
    #
    # Creates a ethernet interface used as parent-interface for subsequent examples
    #
    scm_parent_interface = scm.EthernetInterface("scm_parent_interface",
        name="$scm_parent_interface",
        comment="Managed by Pulumi",
        folder="ngfw-shared",
        layer2={})
    #
    # Creates a layer2 sub-interface with vlan tag 100
    #
    scm_layer2_subinterface = scm.Layer2Subinterface("scm_layer2_subinterface",
        name="$scm_parent_interface.100",
        comment="Managed by Pulumi",
        folder="ngfw-shared",
        vlan_tag="100",
        parent_interface="$scm_parent_interface",
        opts = pulumi.ResourceOptions(depends_on=[scm_parent_interface]))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-scm/sdk/go/scm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Creates a ethernet interface used as parent-interface for subsequent examples
    		scmParentInterface, err := scm.NewEthernetInterface(ctx, "scm_parent_interface", &scm.EthernetInterfaceArgs{
    			Name:    pulumi.String("$scm_parent_interface"),
    			Comment: pulumi.String("Managed by Pulumi"),
    			Folder:  pulumi.String("ngfw-shared"),
    			Layer2:  &scm.EthernetInterfaceLayer2Args{},
    		})
    		if err != nil {
    			return err
    		}
    		// Creates a layer2 sub-interface with vlan tag 100
    		_, err = scm.NewLayer2Subinterface(ctx, "scm_layer2_subinterface", &scm.Layer2SubinterfaceArgs{
    			Name:            pulumi.String("$scm_parent_interface.100"),
    			Comment:         pulumi.String("Managed by Pulumi"),
    			Folder:          pulumi.String("ngfw-shared"),
    			VlanTag:         pulumi.String("100"),
    			ParentInterface: pulumi.String("$scm_parent_interface"),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			scmParentInterface,
    		}))
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scm = Pulumi.Scm;
    
    return await Deployment.RunAsync(() => 
    {
        //
        // Creates a ethernet interface used as parent-interface for subsequent examples
        //
        var scmParentInterface = new Scm.EthernetInterface("scm_parent_interface", new()
        {
            Name = "$scm_parent_interface",
            Comment = "Managed by Pulumi",
            Folder = "ngfw-shared",
            Layer2 = null,
        });
    
        //
        // Creates a layer2 sub-interface with vlan tag 100
        //
        var scmLayer2Subinterface = new Scm.Layer2Subinterface("scm_layer2_subinterface", new()
        {
            Name = "$scm_parent_interface.100",
            Comment = "Managed by Pulumi",
            Folder = "ngfw-shared",
            VlanTag = "100",
            ParentInterface = "$scm_parent_interface",
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                scmParentInterface,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scm.EthernetInterface;
    import com.pulumi.scm.EthernetInterfaceArgs;
    import com.pulumi.scm.inputs.EthernetInterfaceLayer2Args;
    import com.pulumi.scm.Layer2Subinterface;
    import com.pulumi.scm.Layer2SubinterfaceArgs;
    import com.pulumi.resources.CustomResourceOptions;
    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) {
            //
            // Creates a ethernet interface used as parent-interface for subsequent examples
            //
            var scmParentInterface = new EthernetInterface("scmParentInterface", EthernetInterfaceArgs.builder()
                .name("$scm_parent_interface")
                .comment("Managed by Pulumi")
                .folder("ngfw-shared")
                .layer2(EthernetInterfaceLayer2Args.builder()
                    .build())
                .build());
    
            //
            // Creates a layer2 sub-interface with vlan tag 100
            //
            var scmLayer2Subinterface = new Layer2Subinterface("scmLayer2Subinterface", Layer2SubinterfaceArgs.builder()
                .name("$scm_parent_interface.100")
                .comment("Managed by Pulumi")
                .folder("ngfw-shared")
                .vlanTag("100")
                .parentInterface("$scm_parent_interface")
                .build(), CustomResourceOptions.builder()
                    .dependsOn(scmParentInterface)
                    .build());
    
        }
    }
    
    resources:
      #
      # Creates a ethernet interface used as parent-interface for subsequent examples
      #
      scmParentInterface:
        type: scm:EthernetInterface
        name: scm_parent_interface
        properties:
          name: $scm_parent_interface
          comment: Managed by Pulumi
          folder: ngfw-shared
          layer2: {}
      #
      # Creates a layer2 sub-interface with vlan tag 100
      #
      scmLayer2Subinterface:
        type: scm:Layer2Subinterface
        name: scm_layer2_subinterface
        properties:
          name: $scm_parent_interface.100
          comment: Managed by Pulumi
          folder: ngfw-shared
          vlanTag: 100
          parentInterface: $scm_parent_interface
        options:
          dependsOn:
            - ${scmParentInterface}
    

    Create Layer2Subinterface Resource

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

    Constructor syntax

    new Layer2Subinterface(name: string, args: Layer2SubinterfaceArgs, opts?: CustomResourceOptions);
    @overload
    def Layer2Subinterface(resource_name: str,
                           args: Layer2SubinterfaceArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def Layer2Subinterface(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           vlan_tag: Optional[str] = None,
                           comment: Optional[str] = None,
                           device: Optional[str] = None,
                           folder: Optional[str] = None,
                           name: Optional[str] = None,
                           parent_interface: Optional[str] = None,
                           snippet: Optional[str] = None)
    func NewLayer2Subinterface(ctx *Context, name string, args Layer2SubinterfaceArgs, opts ...ResourceOption) (*Layer2Subinterface, error)
    public Layer2Subinterface(string name, Layer2SubinterfaceArgs args, CustomResourceOptions? opts = null)
    public Layer2Subinterface(String name, Layer2SubinterfaceArgs args)
    public Layer2Subinterface(String name, Layer2SubinterfaceArgs args, CustomResourceOptions options)
    
    type: scm:Layer2Subinterface
    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 Layer2SubinterfaceArgs
    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 Layer2SubinterfaceArgs
    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 Layer2SubinterfaceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args Layer2SubinterfaceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args Layer2SubinterfaceArgs
    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 layer2SubinterfaceResource = new Scm.Layer2Subinterface("layer2SubinterfaceResource", new()
    {
        VlanTag = "string",
        Comment = "string",
        Device = "string",
        Folder = "string",
        Name = "string",
        ParentInterface = "string",
        Snippet = "string",
    });
    
    example, err := scm.NewLayer2Subinterface(ctx, "layer2SubinterfaceResource", &scm.Layer2SubinterfaceArgs{
    	VlanTag:         pulumi.String("string"),
    	Comment:         pulumi.String("string"),
    	Device:          pulumi.String("string"),
    	Folder:          pulumi.String("string"),
    	Name:            pulumi.String("string"),
    	ParentInterface: pulumi.String("string"),
    	Snippet:         pulumi.String("string"),
    })
    
    var layer2SubinterfaceResource = new Layer2Subinterface("layer2SubinterfaceResource", Layer2SubinterfaceArgs.builder()
        .vlanTag("string")
        .comment("string")
        .device("string")
        .folder("string")
        .name("string")
        .parentInterface("string")
        .snippet("string")
        .build());
    
    layer2_subinterface_resource = scm.Layer2Subinterface("layer2SubinterfaceResource",
        vlan_tag="string",
        comment="string",
        device="string",
        folder="string",
        name="string",
        parent_interface="string",
        snippet="string")
    
    const layer2SubinterfaceResource = new scm.Layer2Subinterface("layer2SubinterfaceResource", {
        vlanTag: "string",
        comment: "string",
        device: "string",
        folder: "string",
        name: "string",
        parentInterface: "string",
        snippet: "string",
    });
    
    type: scm:Layer2Subinterface
    properties:
        comment: string
        device: string
        folder: string
        name: string
        parentInterface: string
        snippet: string
        vlanTag: string
    

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

    VlanTag string
    VLAN tag
    Comment string
    Description
    Device string
    The device in which the resource is defined
    Folder string
    The folder in which the resource is defined
    Name string
    L2 sub-interface name
    ParentInterface string
    Parent interface
    Snippet string
    The snippet in which the resource is defined
    VlanTag string
    VLAN tag
    Comment string
    Description
    Device string
    The device in which the resource is defined
    Folder string
    The folder in which the resource is defined
    Name string
    L2 sub-interface name
    ParentInterface string
    Parent interface
    Snippet string
    The snippet in which the resource is defined
    vlanTag String
    VLAN tag
    comment String
    Description
    device String
    The device in which the resource is defined
    folder String
    The folder in which the resource is defined
    name String
    L2 sub-interface name
    parentInterface String
    Parent interface
    snippet String
    The snippet in which the resource is defined
    vlanTag string
    VLAN tag
    comment string
    Description
    device string
    The device in which the resource is defined
    folder string
    The folder in which the resource is defined
    name string
    L2 sub-interface name
    parentInterface string
    Parent interface
    snippet string
    The snippet in which the resource is defined
    vlan_tag str
    VLAN tag
    comment str
    Description
    device str
    The device in which the resource is defined
    folder str
    The folder in which the resource is defined
    name str
    L2 sub-interface name
    parent_interface str
    Parent interface
    snippet str
    The snippet in which the resource is defined
    vlanTag String
    VLAN tag
    comment String
    Description
    device String
    The device in which the resource is defined
    folder String
    The folder in which the resource is defined
    name String
    L2 sub-interface name
    parentInterface String
    Parent interface
    snippet String
    The snippet in which the resource is defined

    Outputs

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

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

    Look up Existing Layer2Subinterface Resource

    Get an existing Layer2Subinterface 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?: Layer2SubinterfaceState, opts?: CustomResourceOptions): Layer2Subinterface
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            comment: Optional[str] = None,
            device: Optional[str] = None,
            folder: Optional[str] = None,
            name: Optional[str] = None,
            parent_interface: Optional[str] = None,
            snippet: Optional[str] = None,
            tfid: Optional[str] = None,
            vlan_tag: Optional[str] = None) -> Layer2Subinterface
    func GetLayer2Subinterface(ctx *Context, name string, id IDInput, state *Layer2SubinterfaceState, opts ...ResourceOption) (*Layer2Subinterface, error)
    public static Layer2Subinterface Get(string name, Input<string> id, Layer2SubinterfaceState? state, CustomResourceOptions? opts = null)
    public static Layer2Subinterface get(String name, Output<String> id, Layer2SubinterfaceState state, CustomResourceOptions options)
    resources:  _:    type: scm:Layer2Subinterface    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.
    The following state arguments are supported:
    Comment string
    Description
    Device string
    The device in which the resource is defined
    Folder string
    The folder in which the resource is defined
    Name string
    L2 sub-interface name
    ParentInterface string
    Parent interface
    Snippet string
    The snippet in which the resource is defined
    Tfid string
    VlanTag string
    VLAN tag
    Comment string
    Description
    Device string
    The device in which the resource is defined
    Folder string
    The folder in which the resource is defined
    Name string
    L2 sub-interface name
    ParentInterface string
    Parent interface
    Snippet string
    The snippet in which the resource is defined
    Tfid string
    VlanTag string
    VLAN tag
    comment String
    Description
    device String
    The device in which the resource is defined
    folder String
    The folder in which the resource is defined
    name String
    L2 sub-interface name
    parentInterface String
    Parent interface
    snippet String
    The snippet in which the resource is defined
    tfid String
    vlanTag String
    VLAN tag
    comment string
    Description
    device string
    The device in which the resource is defined
    folder string
    The folder in which the resource is defined
    name string
    L2 sub-interface name
    parentInterface string
    Parent interface
    snippet string
    The snippet in which the resource is defined
    tfid string
    vlanTag string
    VLAN tag
    comment str
    Description
    device str
    The device in which the resource is defined
    folder str
    The folder in which the resource is defined
    name str
    L2 sub-interface name
    parent_interface str
    Parent interface
    snippet str
    The snippet in which the resource is defined
    tfid str
    vlan_tag str
    VLAN tag
    comment String
    Description
    device String
    The device in which the resource is defined
    folder String
    The folder in which the resource is defined
    name String
    L2 sub-interface name
    parentInterface String
    Parent interface
    snippet String
    The snippet in which the resource is defined
    tfid String
    vlanTag String
    VLAN tag

    Package Details

    Repository
    scm pulumi/pulumi-scm
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the scm Terraform Provider.
    scm logo
    Strata Cloud Manager v0.4.3 published on Saturday, Nov 8, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate