1. Packages
  2. Packages
  3. Nsxt Provider
  4. API Docs
  5. getPolicyTier0Gateway
Viewing docs for nsxt 3.12.0
published on Monday, May 18, 2026 by vmware
Viewing docs for nsxt 3.12.0
published on Monday, May 18, 2026 by vmware

    This data source provides information about policy Tier-0 gateways configured on NSX.

    This data source is applicable to NSX Policy Manager, NSX Global Manager and VMC.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as nsxt from "@pulumi/nsxt";
    
    const tier0GwGateway = nsxt.getPolicyTier0Gateway({
        displayName: "tier0-gw",
    });
    
    import pulumi
    import pulumi_nsxt as nsxt
    
    tier0_gw_gateway = nsxt.get_policy_tier0_gateway(display_name="tier0-gw")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/nsxt/v3/nsxt"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := nsxt.LookupPolicyTier0Gateway(ctx, &nsxt.LookupPolicyTier0GatewayArgs{
    			DisplayName: pulumi.StringRef("tier0-gw"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Nsxt = Pulumi.Nsxt;
    
    return await Deployment.RunAsync(() => 
    {
        var tier0GwGateway = Nsxt.GetPolicyTier0Gateway.Invoke(new()
        {
            DisplayName = "tier0-gw",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.nsxt.NsxtFunctions;
    import com.pulumi.nsxt.inputs.GetPolicyTier0GatewayArgs;
    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 tier0GwGateway = NsxtFunctions.getPolicyTier0Gateway(GetPolicyTier0GatewayArgs.builder()
                .displayName("tier0-gw")
                .build());
    
        }
    }
    
    variables:
      tier0GwGateway:
        fn::invoke:
          function: nsxt:getPolicyTier0Gateway
          arguments:
            displayName: tier0-gw
    
    Example coming soon!
    

    Global Infra

    import * as pulumi from "@pulumi/pulumi";
    import * as nsxt from "@pulumi/nsxt";
    
    const tier0GwGatewayGlobal = nsxt.getPolicyTier0Gateway({
        context: {
            fromGlobal: true,
        },
        displayName: "tier0-gw",
    });
    
    import pulumi
    import pulumi_nsxt as nsxt
    
    tier0_gw_gateway_global = nsxt.get_policy_tier0_gateway(context={
            "from_global": True,
        },
        display_name="tier0-gw")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/nsxt/v3/nsxt"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := nsxt.LookupPolicyTier0Gateway(ctx, &nsxt.LookupPolicyTier0GatewayArgs{
    			Context: nsxt.GetPolicyTier0GatewayContext{
    				FromGlobal: pulumi.BoolRef(true),
    			},
    			DisplayName: pulumi.StringRef("tier0-gw"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Nsxt = Pulumi.Nsxt;
    
    return await Deployment.RunAsync(() => 
    {
        var tier0GwGatewayGlobal = Nsxt.GetPolicyTier0Gateway.Invoke(new()
        {
            Context = new Nsxt.Inputs.GetPolicyTier0GatewayContextInputArgs
            {
                FromGlobal = true,
            },
            DisplayName = "tier0-gw",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.nsxt.NsxtFunctions;
    import com.pulumi.nsxt.inputs.GetPolicyTier0GatewayArgs;
    import com.pulumi.nsxt.inputs.GetPolicyTier0GatewayContextArgs;
    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 tier0GwGatewayGlobal = NsxtFunctions.getPolicyTier0Gateway(GetPolicyTier0GatewayArgs.builder()
                .context(GetPolicyTier0GatewayContextArgs.builder()
                    .fromGlobal(true)
                    .build())
                .displayName("tier0-gw")
                .build());
    
        }
    }
    
    variables:
      tier0GwGatewayGlobal:
        fn::invoke:
          function: nsxt:getPolicyTier0Gateway
          arguments:
            context:
              fromGlobal: true
            displayName: tier0-gw
    
    Example coming soon!
    

    Using getPolicyTier0Gateway

    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 getPolicyTier0Gateway(args: GetPolicyTier0GatewayArgs, opts?: InvokeOptions): Promise<GetPolicyTier0GatewayResult>
    function getPolicyTier0GatewayOutput(args: GetPolicyTier0GatewayOutputArgs, opts?: InvokeOptions): Output<GetPolicyTier0GatewayResult>
    def get_policy_tier0_gateway(context: Optional[GetPolicyTier0GatewayContext] = None,
                                 description: Optional[str] = None,
                                 display_name: Optional[str] = None,
                                 edge_cluster_path: Optional[str] = None,
                                 id: Optional[str] = None,
                                 vrf_config: Optional[GetPolicyTier0GatewayVrfConfig] = None,
                                 opts: Optional[InvokeOptions] = None) -> GetPolicyTier0GatewayResult
    def get_policy_tier0_gateway_output(context: pulumi.Input[Optional[GetPolicyTier0GatewayContextArgs]] = None,
                                 description: pulumi.Input[Optional[str]] = None,
                                 display_name: pulumi.Input[Optional[str]] = None,
                                 edge_cluster_path: pulumi.Input[Optional[str]] = None,
                                 id: pulumi.Input[Optional[str]] = None,
                                 vrf_config: pulumi.Input[Optional[GetPolicyTier0GatewayVrfConfigArgs]] = None,
                                 opts: Optional[InvokeOptions] = None) -> Output[GetPolicyTier0GatewayResult]
    func LookupPolicyTier0Gateway(ctx *Context, args *LookupPolicyTier0GatewayArgs, opts ...InvokeOption) (*LookupPolicyTier0GatewayResult, error)
    func LookupPolicyTier0GatewayOutput(ctx *Context, args *LookupPolicyTier0GatewayOutputArgs, opts ...InvokeOption) LookupPolicyTier0GatewayResultOutput

    > Note: This function is named LookupPolicyTier0Gateway in the Go SDK.

    public static class GetPolicyTier0Gateway 
    {
        public static Task<GetPolicyTier0GatewayResult> InvokeAsync(GetPolicyTier0GatewayArgs args, InvokeOptions? opts = null)
        public static Output<GetPolicyTier0GatewayResult> Invoke(GetPolicyTier0GatewayInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPolicyTier0GatewayResult> getPolicyTier0Gateway(GetPolicyTier0GatewayArgs args, InvokeOptions options)
    public static Output<GetPolicyTier0GatewayResult> getPolicyTier0Gateway(GetPolicyTier0GatewayArgs args, InvokeOptions options)
    
    fn::invoke:
      function: nsxt:index/getPolicyTier0Gateway:getPolicyTier0Gateway
      arguments:
        # arguments dictionary
    data "nsxt_getpolicytier0gateway" "name" {
        # arguments
    }

    The following arguments are supported:

    Context GetPolicyTier0GatewayContext
    The context which the object belongs to
    Description string
    The description of the resource.
    DisplayName string
    The Display Name prefix of the Tier-0 gateway to retrieve.
    EdgeClusterPath string
    The path of the Edge cluster where this Tier-0 gateway is placed. This attribute is not set for NSX Global Manager, where gateway can span across multiple sites.
    Id string
    The ID of Tier-0 gateway to retrieve.
    VrfConfig GetPolicyTier0GatewayVrfConfig
    VRF config for VRF Tier0. This clause is supported with NSX 3.0.0 onwards.
    Context GetPolicyTier0GatewayContext
    The context which the object belongs to
    Description string
    The description of the resource.
    DisplayName string
    The Display Name prefix of the Tier-0 gateway to retrieve.
    EdgeClusterPath string
    The path of the Edge cluster where this Tier-0 gateway is placed. This attribute is not set for NSX Global Manager, where gateway can span across multiple sites.
    Id string
    The ID of Tier-0 gateway to retrieve.
    VrfConfig GetPolicyTier0GatewayVrfConfig
    VRF config for VRF Tier0. This clause is supported with NSX 3.0.0 onwards.
    context object
    The context which the object belongs to
    description string
    The description of the resource.
    display_name string
    The Display Name prefix of the Tier-0 gateway to retrieve.
    edge_cluster_path string
    The path of the Edge cluster where this Tier-0 gateway is placed. This attribute is not set for NSX Global Manager, where gateway can span across multiple sites.
    id string
    The ID of Tier-0 gateway to retrieve.
    vrf_config object
    VRF config for VRF Tier0. This clause is supported with NSX 3.0.0 onwards.
    context GetPolicyTier0GatewayContext
    The context which the object belongs to
    description String
    The description of the resource.
    displayName String
    The Display Name prefix of the Tier-0 gateway to retrieve.
    edgeClusterPath String
    The path of the Edge cluster where this Tier-0 gateway is placed. This attribute is not set for NSX Global Manager, where gateway can span across multiple sites.
    id String
    The ID of Tier-0 gateway to retrieve.
    vrfConfig GetPolicyTier0GatewayVrfConfig
    VRF config for VRF Tier0. This clause is supported with NSX 3.0.0 onwards.
    context GetPolicyTier0GatewayContext
    The context which the object belongs to
    description string
    The description of the resource.
    displayName string
    The Display Name prefix of the Tier-0 gateway to retrieve.
    edgeClusterPath string
    The path of the Edge cluster where this Tier-0 gateway is placed. This attribute is not set for NSX Global Manager, where gateway can span across multiple sites.
    id string
    The ID of Tier-0 gateway to retrieve.
    vrfConfig GetPolicyTier0GatewayVrfConfig
    VRF config for VRF Tier0. This clause is supported with NSX 3.0.0 onwards.
    context GetPolicyTier0GatewayContext
    The context which the object belongs to
    description str
    The description of the resource.
    display_name str
    The Display Name prefix of the Tier-0 gateway to retrieve.
    edge_cluster_path str
    The path of the Edge cluster where this Tier-0 gateway is placed. This attribute is not set for NSX Global Manager, where gateway can span across multiple sites.
    id str
    The ID of Tier-0 gateway to retrieve.
    vrf_config GetPolicyTier0GatewayVrfConfig
    VRF config for VRF Tier0. This clause is supported with NSX 3.0.0 onwards.
    context Property Map
    The context which the object belongs to
    description String
    The description of the resource.
    displayName String
    The Display Name prefix of the Tier-0 gateway to retrieve.
    edgeClusterPath String
    The path of the Edge cluster where this Tier-0 gateway is placed. This attribute is not set for NSX Global Manager, where gateway can span across multiple sites.
    id String
    The ID of Tier-0 gateway to retrieve.
    vrfConfig Property Map
    VRF config for VRF Tier0. This clause is supported with NSX 3.0.0 onwards.

    getPolicyTier0Gateway Result

    The following output properties are available:

    Description string
    The description of the resource.
    DisplayName string
    EdgeClusterPath string
    The path of the Edge cluster where this Tier-0 gateway is placed. This attribute is not set for NSX Global Manager, where gateway can span across multiple sites.
    Id string
    Path string
    The NSX path of the policy resource.
    Context GetPolicyTier0GatewayContext
    VrfConfig GetPolicyTier0GatewayVrfConfig
    VRF config for VRF Tier0. This clause is supported with NSX 3.0.0 onwards.
    Description string
    The description of the resource.
    DisplayName string
    EdgeClusterPath string
    The path of the Edge cluster where this Tier-0 gateway is placed. This attribute is not set for NSX Global Manager, where gateway can span across multiple sites.
    Id string
    Path string
    The NSX path of the policy resource.
    Context GetPolicyTier0GatewayContext
    VrfConfig GetPolicyTier0GatewayVrfConfig
    VRF config for VRF Tier0. This clause is supported with NSX 3.0.0 onwards.
    description string
    The description of the resource.
    display_name string
    edge_cluster_path string
    The path of the Edge cluster where this Tier-0 gateway is placed. This attribute is not set for NSX Global Manager, where gateway can span across multiple sites.
    id string
    path string
    The NSX path of the policy resource.
    context object
    vrf_config object
    VRF config for VRF Tier0. This clause is supported with NSX 3.0.0 onwards.
    description String
    The description of the resource.
    displayName String
    edgeClusterPath String
    The path of the Edge cluster where this Tier-0 gateway is placed. This attribute is not set for NSX Global Manager, where gateway can span across multiple sites.
    id String
    path String
    The NSX path of the policy resource.
    context GetPolicyTier0GatewayContext
    vrfConfig GetPolicyTier0GatewayVrfConfig
    VRF config for VRF Tier0. This clause is supported with NSX 3.0.0 onwards.
    description string
    The description of the resource.
    displayName string
    edgeClusterPath string
    The path of the Edge cluster where this Tier-0 gateway is placed. This attribute is not set for NSX Global Manager, where gateway can span across multiple sites.
    id string
    path string
    The NSX path of the policy resource.
    context GetPolicyTier0GatewayContext
    vrfConfig GetPolicyTier0GatewayVrfConfig
    VRF config for VRF Tier0. This clause is supported with NSX 3.0.0 onwards.
    description str
    The description of the resource.
    display_name str
    edge_cluster_path str
    The path of the Edge cluster where this Tier-0 gateway is placed. This attribute is not set for NSX Global Manager, where gateway can span across multiple sites.
    id str
    path str
    The NSX path of the policy resource.
    context GetPolicyTier0GatewayContext
    vrf_config GetPolicyTier0GatewayVrfConfig
    VRF config for VRF Tier0. This clause is supported with NSX 3.0.0 onwards.
    description String
    The description of the resource.
    displayName String
    edgeClusterPath String
    The path of the Edge cluster where this Tier-0 gateway is placed. This attribute is not set for NSX Global Manager, where gateway can span across multiple sites.
    id String
    path String
    The NSX path of the policy resource.
    context Property Map
    vrfConfig Property Map
    VRF config for VRF Tier0. This clause is supported with NSX 3.0.0 onwards.

    Supporting Types

    GetPolicyTier0GatewayContext

    FromGlobal bool
    Set to True if the data source will need to search Tier-0 gateway created in a global manager instance (/global-infra)
    ProjectId string
    Id of the project which the resource belongs to.
    FromGlobal bool
    Set to True if the data source will need to search Tier-0 gateway created in a global manager instance (/global-infra)
    ProjectId string
    Id of the project which the resource belongs to.
    from_global bool
    Set to True if the data source will need to search Tier-0 gateway created in a global manager instance (/global-infra)
    project_id string
    Id of the project which the resource belongs to.
    fromGlobal Boolean
    Set to True if the data source will need to search Tier-0 gateway created in a global manager instance (/global-infra)
    projectId String
    Id of the project which the resource belongs to.
    fromGlobal boolean
    Set to True if the data source will need to search Tier-0 gateway created in a global manager instance (/global-infra)
    projectId string
    Id of the project which the resource belongs to.
    from_global bool
    Set to True if the data source will need to search Tier-0 gateway created in a global manager instance (/global-infra)
    project_id str
    Id of the project which the resource belongs to.
    fromGlobal Boolean
    Set to True if the data source will need to search Tier-0 gateway created in a global manager instance (/global-infra)
    projectId String
    Id of the project which the resource belongs to.

    GetPolicyTier0GatewayVrfConfig

    GatewayPath string
    Default Tier0 path. Cannot be modified after realization.
    Path string
    The NSX path of the policy resource.
    EvpnTransitVni double
    L3 VNI associated with the VRF for overlay traffic. VNI must be unique and belong to configured VNI pool.
    RouteDistinguisher string
    Route distinguisher. Format: <ASN>:<number> or <IPAddress>:<number>.
    RouteTarget GetPolicyTier0GatewayVrfConfigRouteTarget
    Only one target is supported.
    Tags List<GetPolicyTier0GatewayVrfConfigTag>
    Set of opaque identifiers meaningful to the user
    GatewayPath string
    Default Tier0 path. Cannot be modified after realization.
    Path string
    The NSX path of the policy resource.
    EvpnTransitVni float64
    L3 VNI associated with the VRF for overlay traffic. VNI must be unique and belong to configured VNI pool.
    RouteDistinguisher string
    Route distinguisher. Format: <ASN>:<number> or <IPAddress>:<number>.
    RouteTarget GetPolicyTier0GatewayVrfConfigRouteTarget
    Only one target is supported.
    Tags []GetPolicyTier0GatewayVrfConfigTag
    Set of opaque identifiers meaningful to the user
    gateway_path string
    Default Tier0 path. Cannot be modified after realization.
    path string
    The NSX path of the policy resource.
    evpn_transit_vni number
    L3 VNI associated with the VRF for overlay traffic. VNI must be unique and belong to configured VNI pool.
    route_distinguisher string
    Route distinguisher. Format: <ASN>:<number> or <IPAddress>:<number>.
    route_target object
    Only one target is supported.
    tags list(object)
    Set of opaque identifiers meaningful to the user
    gatewayPath String
    Default Tier0 path. Cannot be modified after realization.
    path String
    The NSX path of the policy resource.
    evpnTransitVni Double
    L3 VNI associated with the VRF for overlay traffic. VNI must be unique and belong to configured VNI pool.
    routeDistinguisher String
    Route distinguisher. Format: <ASN>:<number> or <IPAddress>:<number>.
    routeTarget GetPolicyTier0GatewayVrfConfigRouteTarget
    Only one target is supported.
    tags List<GetPolicyTier0GatewayVrfConfigTag>
    Set of opaque identifiers meaningful to the user
    gatewayPath string
    Default Tier0 path. Cannot be modified after realization.
    path string
    The NSX path of the policy resource.
    evpnTransitVni number
    L3 VNI associated with the VRF for overlay traffic. VNI must be unique and belong to configured VNI pool.
    routeDistinguisher string
    Route distinguisher. Format: <ASN>:<number> or <IPAddress>:<number>.
    routeTarget GetPolicyTier0GatewayVrfConfigRouteTarget
    Only one target is supported.
    tags GetPolicyTier0GatewayVrfConfigTag[]
    Set of opaque identifiers meaningful to the user
    gateway_path str
    Default Tier0 path. Cannot be modified after realization.
    path str
    The NSX path of the policy resource.
    evpn_transit_vni float
    L3 VNI associated with the VRF for overlay traffic. VNI must be unique and belong to configured VNI pool.
    route_distinguisher str
    Route distinguisher. Format: <ASN>:<number> or <IPAddress>:<number>.
    route_target GetPolicyTier0GatewayVrfConfigRouteTarget
    Only one target is supported.
    tags Sequence[GetPolicyTier0GatewayVrfConfigTag]
    Set of opaque identifiers meaningful to the user
    gatewayPath String
    Default Tier0 path. Cannot be modified after realization.
    path String
    The NSX path of the policy resource.
    evpnTransitVni Number
    L3 VNI associated with the VRF for overlay traffic. VNI must be unique and belong to configured VNI pool.
    routeDistinguisher String
    Route distinguisher. Format: <ASN>:<number> or <IPAddress>:<number>.
    routeTarget Property Map
    Only one target is supported.
    tags List<Property Map>
    Set of opaque identifiers meaningful to the user

    GetPolicyTier0GatewayVrfConfigRouteTarget

    AddressFamily string
    Address family, currently only L2VPN_EVPN is supported, which is the default.
    AutoMode bool
    When true, import and export targets should not be specified.
    ExportTargets List<string>
    List of export route targets. Format: <ASN>:<number>.
    ImportTargets List<string>
    List of import route targets. Format: <ASN>:<number>.
    AddressFamily string
    Address family, currently only L2VPN_EVPN is supported, which is the default.
    AutoMode bool
    When true, import and export targets should not be specified.
    ExportTargets []string
    List of export route targets. Format: <ASN>:<number>.
    ImportTargets []string
    List of import route targets. Format: <ASN>:<number>.
    address_family string
    Address family, currently only L2VPN_EVPN is supported, which is the default.
    auto_mode bool
    When true, import and export targets should not be specified.
    export_targets list(string)
    List of export route targets. Format: <ASN>:<number>.
    import_targets list(string)
    List of import route targets. Format: <ASN>:<number>.
    addressFamily String
    Address family, currently only L2VPN_EVPN is supported, which is the default.
    autoMode Boolean
    When true, import and export targets should not be specified.
    exportTargets List<String>
    List of export route targets. Format: <ASN>:<number>.
    importTargets List<String>
    List of import route targets. Format: <ASN>:<number>.
    addressFamily string
    Address family, currently only L2VPN_EVPN is supported, which is the default.
    autoMode boolean
    When true, import and export targets should not be specified.
    exportTargets string[]
    List of export route targets. Format: <ASN>:<number>.
    importTargets string[]
    List of import route targets. Format: <ASN>:<number>.
    address_family str
    Address family, currently only L2VPN_EVPN is supported, which is the default.
    auto_mode bool
    When true, import and export targets should not be specified.
    export_targets Sequence[str]
    List of export route targets. Format: <ASN>:<number>.
    import_targets Sequence[str]
    List of import route targets. Format: <ASN>:<number>.
    addressFamily String
    Address family, currently only L2VPN_EVPN is supported, which is the default.
    autoMode Boolean
    When true, import and export targets should not be specified.
    exportTargets List<String>
    List of export route targets. Format: <ASN>:<number>.
    importTargets List<String>
    List of import route targets. Format: <ASN>:<number>.

    GetPolicyTier0GatewayVrfConfigTag

    Scope string
    Tag string
    Scope string
    Tag string
    scope string
    tag string
    scope String
    tag String
    scope string
    tag string
    scope str
    tag str
    scope String
    tag String

    Package Details

    Repository
    nsxt vmware/terraform-provider-nsxt
    License
    Notes
    This Pulumi package is based on the nsxt Terraform Provider.
    Viewing docs for nsxt 3.12.0
    published on Monday, May 18, 2026 by vmware
      Try Pulumi Cloud free. Your team will thank you.