1. Packages
  2. Nsxt Provider
  3. API Docs
  4. PolicyL2VpnService
nsxt 3.8.1 published on Wednesday, Apr 30, 2025 by vmware

nsxt.PolicyL2VpnService

Explore with Pulumi AI

nsxt logo
nsxt 3.8.1 published on Wednesday, Apr 30, 2025 by vmware

    Create PolicyL2VpnService Resource

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

    Constructor syntax

    new PolicyL2VpnService(name: string, args: PolicyL2VpnServiceArgs, opts?: CustomResourceOptions);
    @overload
    def PolicyL2VpnService(resource_name: str,
                           args: PolicyL2VpnServiceArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def PolicyL2VpnService(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           display_name: Optional[str] = None,
                           description: Optional[str] = None,
                           enable_hub: Optional[bool] = None,
                           encap_ip_pools: Optional[Sequence[str]] = None,
                           gateway_path: Optional[str] = None,
                           locale_service_path: Optional[str] = None,
                           mode: Optional[str] = None,
                           nsx_id: Optional[str] = None,
                           policy_l2_vpn_service_id: Optional[str] = None,
                           tags: Optional[Sequence[PolicyL2VpnServiceTagArgs]] = None)
    func NewPolicyL2VpnService(ctx *Context, name string, args PolicyL2VpnServiceArgs, opts ...ResourceOption) (*PolicyL2VpnService, error)
    public PolicyL2VpnService(string name, PolicyL2VpnServiceArgs args, CustomResourceOptions? opts = null)
    public PolicyL2VpnService(String name, PolicyL2VpnServiceArgs args)
    public PolicyL2VpnService(String name, PolicyL2VpnServiceArgs args, CustomResourceOptions options)
    
    type: nsxt:PolicyL2VpnService
    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 PolicyL2VpnServiceArgs
    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 PolicyL2VpnServiceArgs
    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 PolicyL2VpnServiceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PolicyL2VpnServiceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PolicyL2VpnServiceArgs
    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 policyL2VpnServiceResource = new Nsxt.PolicyL2VpnService("policyL2VpnServiceResource", new()
    {
        DisplayName = "string",
        Description = "string",
        EnableHub = false,
        EncapIpPools = new[]
        {
            "string",
        },
        GatewayPath = "string",
        Mode = "string",
        NsxId = "string",
        PolicyL2VpnServiceId = "string",
        Tags = new[]
        {
            new Nsxt.Inputs.PolicyL2VpnServiceTagArgs
            {
                Scope = "string",
                Tag = "string",
            },
        },
    });
    
    example, err := nsxt.NewPolicyL2VpnService(ctx, "policyL2VpnServiceResource", &nsxt.PolicyL2VpnServiceArgs{
    	DisplayName: pulumi.String("string"),
    	Description: pulumi.String("string"),
    	EnableHub:   pulumi.Bool(false),
    	EncapIpPools: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	GatewayPath:          pulumi.String("string"),
    	Mode:                 pulumi.String("string"),
    	NsxId:                pulumi.String("string"),
    	PolicyL2VpnServiceId: pulumi.String("string"),
    	Tags: nsxt.PolicyL2VpnServiceTagArray{
    		&nsxt.PolicyL2VpnServiceTagArgs{
    			Scope: pulumi.String("string"),
    			Tag:   pulumi.String("string"),
    		},
    	},
    })
    
    var policyL2VpnServiceResource = new PolicyL2VpnService("policyL2VpnServiceResource", PolicyL2VpnServiceArgs.builder()
        .displayName("string")
        .description("string")
        .enableHub(false)
        .encapIpPools("string")
        .gatewayPath("string")
        .mode("string")
        .nsxId("string")
        .policyL2VpnServiceId("string")
        .tags(PolicyL2VpnServiceTagArgs.builder()
            .scope("string")
            .tag("string")
            .build())
        .build());
    
    policy_l2_vpn_service_resource = nsxt.PolicyL2VpnService("policyL2VpnServiceResource",
        display_name="string",
        description="string",
        enable_hub=False,
        encap_ip_pools=["string"],
        gateway_path="string",
        mode="string",
        nsx_id="string",
        policy_l2_vpn_service_id="string",
        tags=[{
            "scope": "string",
            "tag": "string",
        }])
    
    const policyL2VpnServiceResource = new nsxt.PolicyL2VpnService("policyL2VpnServiceResource", {
        displayName: "string",
        description: "string",
        enableHub: false,
        encapIpPools: ["string"],
        gatewayPath: "string",
        mode: "string",
        nsxId: "string",
        policyL2VpnServiceId: "string",
        tags: [{
            scope: "string",
            tag: "string",
        }],
    });
    
    type: nsxt:PolicyL2VpnService
    properties:
        description: string
        displayName: string
        enableHub: false
        encapIpPools:
            - string
        gatewayPath: string
        mode: string
        nsxId: string
        policyL2VpnServiceId: string
        tags:
            - scope: string
              tag: string
    

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

    DisplayName string
    Display name of the resource.
    Description string
    Description of the resource.
    EnableHub bool
    This property applies only in SERVER mode. If set to true, traffic from any client will be replicated to all other clients. If set to false, traffic received from clients is only replicated to the local VPN endpoint. Default is true.
    EncapIpPools List<string>
    IP Pool to allocate local and peer endpoint IPs. Format is ipv4 CIDR block.
    GatewayPath string
    Path of gateway associated with the L2 VPN Service. Note that at least one of gateway_path and locale_service_path must be specified for the L2 VPN Service object.
    LocaleServicePath string
    Path of the locale service associated with the L2 VPN Service.

    Deprecated: Deprecated

    Mode string
    Specify an L2VPN service mode as SERVER or CLIENT. Value is one of SERVER, CLIENT. Default is SERVER.
    NsxId string
    The NSX ID of this resource. If set, this ID will be used to create the resource.
    PolicyL2VpnServiceId string
    ID of the resource.
    Tags List<PolicyL2VpnServiceTag>
    A list of scope + tag pairs to associate with this resource.
    DisplayName string
    Display name of the resource.
    Description string
    Description of the resource.
    EnableHub bool
    This property applies only in SERVER mode. If set to true, traffic from any client will be replicated to all other clients. If set to false, traffic received from clients is only replicated to the local VPN endpoint. Default is true.
    EncapIpPools []string
    IP Pool to allocate local and peer endpoint IPs. Format is ipv4 CIDR block.
    GatewayPath string
    Path of gateway associated with the L2 VPN Service. Note that at least one of gateway_path and locale_service_path must be specified for the L2 VPN Service object.
    LocaleServicePath string
    Path of the locale service associated with the L2 VPN Service.

    Deprecated: Deprecated

    Mode string
    Specify an L2VPN service mode as SERVER or CLIENT. Value is one of SERVER, CLIENT. Default is SERVER.
    NsxId string
    The NSX ID of this resource. If set, this ID will be used to create the resource.
    PolicyL2VpnServiceId string
    ID of the resource.
    Tags []PolicyL2VpnServiceTagArgs
    A list of scope + tag pairs to associate with this resource.
    displayName String
    Display name of the resource.
    description String
    Description of the resource.
    enableHub Boolean
    This property applies only in SERVER mode. If set to true, traffic from any client will be replicated to all other clients. If set to false, traffic received from clients is only replicated to the local VPN endpoint. Default is true.
    encapIpPools List<String>
    IP Pool to allocate local and peer endpoint IPs. Format is ipv4 CIDR block.
    gatewayPath String
    Path of gateway associated with the L2 VPN Service. Note that at least one of gateway_path and locale_service_path must be specified for the L2 VPN Service object.
    localeServicePath String
    Path of the locale service associated with the L2 VPN Service.

    Deprecated: Deprecated

    mode String
    Specify an L2VPN service mode as SERVER or CLIENT. Value is one of SERVER, CLIENT. Default is SERVER.
    nsxId String
    The NSX ID of this resource. If set, this ID will be used to create the resource.
    policyL2VpnServiceId String
    ID of the resource.
    tags List<PolicyL2VpnServiceTag>
    A list of scope + tag pairs to associate with this resource.
    displayName string
    Display name of the resource.
    description string
    Description of the resource.
    enableHub boolean
    This property applies only in SERVER mode. If set to true, traffic from any client will be replicated to all other clients. If set to false, traffic received from clients is only replicated to the local VPN endpoint. Default is true.
    encapIpPools string[]
    IP Pool to allocate local and peer endpoint IPs. Format is ipv4 CIDR block.
    gatewayPath string
    Path of gateway associated with the L2 VPN Service. Note that at least one of gateway_path and locale_service_path must be specified for the L2 VPN Service object.
    localeServicePath string
    Path of the locale service associated with the L2 VPN Service.

    Deprecated: Deprecated

    mode string
    Specify an L2VPN service mode as SERVER or CLIENT. Value is one of SERVER, CLIENT. Default is SERVER.
    nsxId string
    The NSX ID of this resource. If set, this ID will be used to create the resource.
    policyL2VpnServiceId string
    ID of the resource.
    tags PolicyL2VpnServiceTag[]
    A list of scope + tag pairs to associate with this resource.
    display_name str
    Display name of the resource.
    description str
    Description of the resource.
    enable_hub bool
    This property applies only in SERVER mode. If set to true, traffic from any client will be replicated to all other clients. If set to false, traffic received from clients is only replicated to the local VPN endpoint. Default is true.
    encap_ip_pools Sequence[str]
    IP Pool to allocate local and peer endpoint IPs. Format is ipv4 CIDR block.
    gateway_path str
    Path of gateway associated with the L2 VPN Service. Note that at least one of gateway_path and locale_service_path must be specified for the L2 VPN Service object.
    locale_service_path str
    Path of the locale service associated with the L2 VPN Service.

    Deprecated: Deprecated

    mode str
    Specify an L2VPN service mode as SERVER or CLIENT. Value is one of SERVER, CLIENT. Default is SERVER.
    nsx_id str
    The NSX ID of this resource. If set, this ID will be used to create the resource.
    policy_l2_vpn_service_id str
    ID of the resource.
    tags Sequence[PolicyL2VpnServiceTagArgs]
    A list of scope + tag pairs to associate with this resource.
    displayName String
    Display name of the resource.
    description String
    Description of the resource.
    enableHub Boolean
    This property applies only in SERVER mode. If set to true, traffic from any client will be replicated to all other clients. If set to false, traffic received from clients is only replicated to the local VPN endpoint. Default is true.
    encapIpPools List<String>
    IP Pool to allocate local and peer endpoint IPs. Format is ipv4 CIDR block.
    gatewayPath String
    Path of gateway associated with the L2 VPN Service. Note that at least one of gateway_path and locale_service_path must be specified for the L2 VPN Service object.
    localeServicePath String
    Path of the locale service associated with the L2 VPN Service.

    Deprecated: Deprecated

    mode String
    Specify an L2VPN service mode as SERVER or CLIENT. Value is one of SERVER, CLIENT. Default is SERVER.
    nsxId String
    The NSX ID of this resource. If set, this ID will be used to create the resource.
    policyL2VpnServiceId String
    ID of the resource.
    tags List<Property Map>
    A list of scope + tag pairs to associate with this resource.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Path string
    The NSX path of the policy resource.
    Revision double
    Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
    Id string
    The provider-assigned unique ID for this managed resource.
    Path string
    The NSX path of the policy resource.
    Revision float64
    Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
    id String
    The provider-assigned unique ID for this managed resource.
    path String
    The NSX path of the policy resource.
    revision Double
    Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
    id string
    The provider-assigned unique ID for this managed resource.
    path string
    The NSX path of the policy resource.
    revision number
    Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
    id str
    The provider-assigned unique ID for this managed resource.
    path str
    The NSX path of the policy resource.
    revision float
    Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
    id String
    The provider-assigned unique ID for this managed resource.
    path String
    The NSX path of the policy resource.
    revision Number
    Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.

    Look up Existing PolicyL2VpnService Resource

    Get an existing PolicyL2VpnService 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?: PolicyL2VpnServiceState, opts?: CustomResourceOptions): PolicyL2VpnService
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            display_name: Optional[str] = None,
            enable_hub: Optional[bool] = None,
            encap_ip_pools: Optional[Sequence[str]] = None,
            gateway_path: Optional[str] = None,
            locale_service_path: Optional[str] = None,
            mode: Optional[str] = None,
            nsx_id: Optional[str] = None,
            path: Optional[str] = None,
            policy_l2_vpn_service_id: Optional[str] = None,
            revision: Optional[float] = None,
            tags: Optional[Sequence[PolicyL2VpnServiceTagArgs]] = None) -> PolicyL2VpnService
    func GetPolicyL2VpnService(ctx *Context, name string, id IDInput, state *PolicyL2VpnServiceState, opts ...ResourceOption) (*PolicyL2VpnService, error)
    public static PolicyL2VpnService Get(string name, Input<string> id, PolicyL2VpnServiceState? state, CustomResourceOptions? opts = null)
    public static PolicyL2VpnService get(String name, Output<String> id, PolicyL2VpnServiceState state, CustomResourceOptions options)
    resources:  _:    type: nsxt:PolicyL2VpnService    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:
    Description string
    Description of the resource.
    DisplayName string
    Display name of the resource.
    EnableHub bool
    This property applies only in SERVER mode. If set to true, traffic from any client will be replicated to all other clients. If set to false, traffic received from clients is only replicated to the local VPN endpoint. Default is true.
    EncapIpPools List<string>
    IP Pool to allocate local and peer endpoint IPs. Format is ipv4 CIDR block.
    GatewayPath string
    Path of gateway associated with the L2 VPN Service. Note that at least one of gateway_path and locale_service_path must be specified for the L2 VPN Service object.
    LocaleServicePath string
    Path of the locale service associated with the L2 VPN Service.

    Deprecated: Deprecated

    Mode string
    Specify an L2VPN service mode as SERVER or CLIENT. Value is one of SERVER, CLIENT. Default is SERVER.
    NsxId string
    The NSX ID of this resource. If set, this ID will be used to create the resource.
    Path string
    The NSX path of the policy resource.
    PolicyL2VpnServiceId string
    ID of the resource.
    Revision double
    Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
    Tags List<PolicyL2VpnServiceTag>
    A list of scope + tag pairs to associate with this resource.
    Description string
    Description of the resource.
    DisplayName string
    Display name of the resource.
    EnableHub bool
    This property applies only in SERVER mode. If set to true, traffic from any client will be replicated to all other clients. If set to false, traffic received from clients is only replicated to the local VPN endpoint. Default is true.
    EncapIpPools []string
    IP Pool to allocate local and peer endpoint IPs. Format is ipv4 CIDR block.
    GatewayPath string
    Path of gateway associated with the L2 VPN Service. Note that at least one of gateway_path and locale_service_path must be specified for the L2 VPN Service object.
    LocaleServicePath string
    Path of the locale service associated with the L2 VPN Service.

    Deprecated: Deprecated

    Mode string
    Specify an L2VPN service mode as SERVER or CLIENT. Value is one of SERVER, CLIENT. Default is SERVER.
    NsxId string
    The NSX ID of this resource. If set, this ID will be used to create the resource.
    Path string
    The NSX path of the policy resource.
    PolicyL2VpnServiceId string
    ID of the resource.
    Revision float64
    Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
    Tags []PolicyL2VpnServiceTagArgs
    A list of scope + tag pairs to associate with this resource.
    description String
    Description of the resource.
    displayName String
    Display name of the resource.
    enableHub Boolean
    This property applies only in SERVER mode. If set to true, traffic from any client will be replicated to all other clients. If set to false, traffic received from clients is only replicated to the local VPN endpoint. Default is true.
    encapIpPools List<String>
    IP Pool to allocate local and peer endpoint IPs. Format is ipv4 CIDR block.
    gatewayPath String
    Path of gateway associated with the L2 VPN Service. Note that at least one of gateway_path and locale_service_path must be specified for the L2 VPN Service object.
    localeServicePath String
    Path of the locale service associated with the L2 VPN Service.

    Deprecated: Deprecated

    mode String
    Specify an L2VPN service mode as SERVER or CLIENT. Value is one of SERVER, CLIENT. Default is SERVER.
    nsxId String
    The NSX ID of this resource. If set, this ID will be used to create the resource.
    path String
    The NSX path of the policy resource.
    policyL2VpnServiceId String
    ID of the resource.
    revision Double
    Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
    tags List<PolicyL2VpnServiceTag>
    A list of scope + tag pairs to associate with this resource.
    description string
    Description of the resource.
    displayName string
    Display name of the resource.
    enableHub boolean
    This property applies only in SERVER mode. If set to true, traffic from any client will be replicated to all other clients. If set to false, traffic received from clients is only replicated to the local VPN endpoint. Default is true.
    encapIpPools string[]
    IP Pool to allocate local and peer endpoint IPs. Format is ipv4 CIDR block.
    gatewayPath string
    Path of gateway associated with the L2 VPN Service. Note that at least one of gateway_path and locale_service_path must be specified for the L2 VPN Service object.
    localeServicePath string
    Path of the locale service associated with the L2 VPN Service.

    Deprecated: Deprecated

    mode string
    Specify an L2VPN service mode as SERVER or CLIENT. Value is one of SERVER, CLIENT. Default is SERVER.
    nsxId string
    The NSX ID of this resource. If set, this ID will be used to create the resource.
    path string
    The NSX path of the policy resource.
    policyL2VpnServiceId string
    ID of the resource.
    revision number
    Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
    tags PolicyL2VpnServiceTag[]
    A list of scope + tag pairs to associate with this resource.
    description str
    Description of the resource.
    display_name str
    Display name of the resource.
    enable_hub bool
    This property applies only in SERVER mode. If set to true, traffic from any client will be replicated to all other clients. If set to false, traffic received from clients is only replicated to the local VPN endpoint. Default is true.
    encap_ip_pools Sequence[str]
    IP Pool to allocate local and peer endpoint IPs. Format is ipv4 CIDR block.
    gateway_path str
    Path of gateway associated with the L2 VPN Service. Note that at least one of gateway_path and locale_service_path must be specified for the L2 VPN Service object.
    locale_service_path str
    Path of the locale service associated with the L2 VPN Service.

    Deprecated: Deprecated

    mode str
    Specify an L2VPN service mode as SERVER or CLIENT. Value is one of SERVER, CLIENT. Default is SERVER.
    nsx_id str
    The NSX ID of this resource. If set, this ID will be used to create the resource.
    path str
    The NSX path of the policy resource.
    policy_l2_vpn_service_id str
    ID of the resource.
    revision float
    Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
    tags Sequence[PolicyL2VpnServiceTagArgs]
    A list of scope + tag pairs to associate with this resource.
    description String
    Description of the resource.
    displayName String
    Display name of the resource.
    enableHub Boolean
    This property applies only in SERVER mode. If set to true, traffic from any client will be replicated to all other clients. If set to false, traffic received from clients is only replicated to the local VPN endpoint. Default is true.
    encapIpPools List<String>
    IP Pool to allocate local and peer endpoint IPs. Format is ipv4 CIDR block.
    gatewayPath String
    Path of gateway associated with the L2 VPN Service. Note that at least one of gateway_path and locale_service_path must be specified for the L2 VPN Service object.
    localeServicePath String
    Path of the locale service associated with the L2 VPN Service.

    Deprecated: Deprecated

    mode String
    Specify an L2VPN service mode as SERVER or CLIENT. Value is one of SERVER, CLIENT. Default is SERVER.
    nsxId String
    The NSX ID of this resource. If set, this ID will be used to create the resource.
    path String
    The NSX path of the policy resource.
    policyL2VpnServiceId String
    ID of the resource.
    revision Number
    Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
    tags List<Property Map>
    A list of scope + tag pairs to associate with this resource.

    Supporting Types

    PolicyL2VpnServiceTag, PolicyL2VpnServiceTagArgs

    Scope string
    Tag string
    A list of scope + tag pairs to associate with this resource.
    Scope string
    Tag string
    A list of scope + tag pairs to associate with this resource.
    scope String
    tag String
    A list of scope + tag pairs to associate with this resource.
    scope string
    tag string
    A list of scope + tag pairs to associate with this resource.
    scope str
    tag str
    A list of scope + tag pairs to associate with this resource.
    scope String
    tag String
    A list of scope + tag pairs to associate with this resource.

    Package Details

    Repository
    nsxt vmware/terraform-provider-nsxt
    License
    Notes
    This Pulumi package is based on the nsxt Terraform Provider.
    nsxt logo
    nsxt 3.8.1 published on Wednesday, Apr 30, 2025 by vmware