nsxt.getPolicyTransportZone
Explore with Pulumi AI
This data source provides information about Policy based Transport Zones (TZ) configured in NSX. A Transport Zone defines the scope to which a network can extend in NSX. For example an overlay based Transport Zone is associated with both hypervisors and logical switches and defines which hypervisors will be able to serve the defined logical switch. Virtual machines on the hypervisor associated with a Transport Zone can be attached to logical switches in that same Transport Zone.
This data source is applicable to NSX Global Manager, NSX Policy Manager and VMC.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as nsxt from "@pulumi/nsxt";
const overlayTransportZone = nsxt.getPolicyTransportZone({
displayName: "1-transportzone-87",
});
import pulumi
import pulumi_nsxt as nsxt
overlay_transport_zone = nsxt.get_policy_transport_zone(display_name="1-transportzone-87")
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.LookupPolicyTransportZone(ctx, &nsxt.LookupPolicyTransportZoneArgs{
DisplayName: pulumi.StringRef("1-transportzone-87"),
}, 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 overlayTransportZone = Nsxt.GetPolicyTransportZone.Invoke(new()
{
DisplayName = "1-transportzone-87",
});
});
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.GetPolicyTransportZoneArgs;
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 overlayTransportZone = NsxtFunctions.getPolicyTransportZone(GetPolicyTransportZoneArgs.builder()
.displayName("1-transportzone-87")
.build());
}
}
variables:
overlayTransportZone:
fn::invoke:
function: nsxt:getPolicyTransportZone
arguments:
displayName: 1-transportzone-87
import * as pulumi from "@pulumi/pulumi";
import * as nsxt from "@pulumi/nsxt";
const vlanTransportZone = nsxt.getPolicyTransportZone({
isDefault: true,
transportType: "VLAN_BACKED",
});
import pulumi
import pulumi_nsxt as nsxt
vlan_transport_zone = nsxt.get_policy_transport_zone(is_default=True,
transport_type="VLAN_BACKED")
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.LookupPolicyTransportZone(ctx, &nsxt.LookupPolicyTransportZoneArgs{
IsDefault: pulumi.BoolRef(true),
TransportType: pulumi.StringRef("VLAN_BACKED"),
}, 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 vlanTransportZone = Nsxt.GetPolicyTransportZone.Invoke(new()
{
IsDefault = true,
TransportType = "VLAN_BACKED",
});
});
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.GetPolicyTransportZoneArgs;
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 vlanTransportZone = NsxtFunctions.getPolicyTransportZone(GetPolicyTransportZoneArgs.builder()
.isDefault(true)
.transportType("VLAN_BACKED")
.build());
}
}
variables:
vlanTransportZone:
fn::invoke:
function: nsxt:getPolicyTransportZone
arguments:
isDefault: true
transportType: VLAN_BACKED
Note: This usage is for Global Manager only.
import * as pulumi from "@pulumi/pulumi";
import * as nsxt from "@pulumi/nsxt";
const paris = nsxt.getPolicySite({
displayName: "Paris",
});
const overlayTransportZone = paris.then(paris => nsxt.getPolicyTransportZone({
displayName: "1-transportzone-87",
sitePath: paris.path,
}));
import pulumi
import pulumi_nsxt as nsxt
paris = nsxt.get_policy_site(display_name="Paris")
overlay_transport_zone = nsxt.get_policy_transport_zone(display_name="1-transportzone-87",
site_path=paris.path)
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 {
paris, err := nsxt.LookupPolicySite(ctx, &nsxt.LookupPolicySiteArgs{
DisplayName: pulumi.StringRef("Paris"),
}, nil)
if err != nil {
return err
}
_, err = nsxt.LookupPolicyTransportZone(ctx, &nsxt.LookupPolicyTransportZoneArgs{
DisplayName: pulumi.StringRef("1-transportzone-87"),
SitePath: pulumi.StringRef(paris.Path),
}, 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 paris = Nsxt.GetPolicySite.Invoke(new()
{
DisplayName = "Paris",
});
var overlayTransportZone = Nsxt.GetPolicyTransportZone.Invoke(new()
{
DisplayName = "1-transportzone-87",
SitePath = paris.Apply(getPolicySiteResult => getPolicySiteResult.Path),
});
});
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.GetPolicySiteArgs;
import com.pulumi.nsxt.inputs.GetPolicyTransportZoneArgs;
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 paris = NsxtFunctions.getPolicySite(GetPolicySiteArgs.builder()
.displayName("Paris")
.build());
final var overlayTransportZone = NsxtFunctions.getPolicyTransportZone(GetPolicyTransportZoneArgs.builder()
.displayName("1-transportzone-87")
.sitePath(paris.applyValue(getPolicySiteResult -> getPolicySiteResult.path()))
.build());
}
}
variables:
paris:
fn::invoke:
function: nsxt:getPolicySite
arguments:
displayName: Paris
overlayTransportZone:
fn::invoke:
function: nsxt:getPolicyTransportZone
arguments:
displayName: 1-transportzone-87
sitePath: ${paris.path}
Using getPolicyTransportZone
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 getPolicyTransportZone(args: GetPolicyTransportZoneArgs, opts?: InvokeOptions): Promise<GetPolicyTransportZoneResult>
function getPolicyTransportZoneOutput(args: GetPolicyTransportZoneOutputArgs, opts?: InvokeOptions): Output<GetPolicyTransportZoneResult>
def get_policy_transport_zone(description: Optional[str] = None,
display_name: Optional[str] = None,
id: Optional[str] = None,
is_default: Optional[bool] = None,
site_path: Optional[str] = None,
transport_type: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetPolicyTransportZoneResult
def get_policy_transport_zone_output(description: Optional[pulumi.Input[str]] = None,
display_name: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
is_default: Optional[pulumi.Input[bool]] = None,
site_path: Optional[pulumi.Input[str]] = None,
transport_type: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetPolicyTransportZoneResult]
func LookupPolicyTransportZone(ctx *Context, args *LookupPolicyTransportZoneArgs, opts ...InvokeOption) (*LookupPolicyTransportZoneResult, error)
func LookupPolicyTransportZoneOutput(ctx *Context, args *LookupPolicyTransportZoneOutputArgs, opts ...InvokeOption) LookupPolicyTransportZoneResultOutput
> Note: This function is named LookupPolicyTransportZone
in the Go SDK.
public static class GetPolicyTransportZone
{
public static Task<GetPolicyTransportZoneResult> InvokeAsync(GetPolicyTransportZoneArgs args, InvokeOptions? opts = null)
public static Output<GetPolicyTransportZoneResult> Invoke(GetPolicyTransportZoneInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetPolicyTransportZoneResult> getPolicyTransportZone(GetPolicyTransportZoneArgs args, InvokeOptions options)
public static Output<GetPolicyTransportZoneResult> getPolicyTransportZone(GetPolicyTransportZoneArgs args, InvokeOptions options)
fn::invoke:
function: nsxt:index/getPolicyTransportZone:getPolicyTransportZone
arguments:
# arguments dictionary
The following arguments are supported:
- Description string
- The description of the Transport Zone.
- Display
Name string - The Display Name prefix of the Transport Zone to retrieve.
- Id string
- The ID of Transport Zone to retrieve.
- Is
Default bool - May be set together with
transport_type
in order to retrieve default Transport Zone for this transport type. - Site
Path string - The path of the site which the Transport Zone belongs to, this configuration is required for global manager only.
path
field of the existingnsxt.PolicySite
can be used here. - Transport
Type string - Transport type of requested Transport Zone, one of
OVERLAY_STANDARD
,OVERLAY_ENS
,OVERLAY_BACKED
,VLAN_BACKED
andUNKNOWN
.
- Description string
- The description of the Transport Zone.
- Display
Name string - The Display Name prefix of the Transport Zone to retrieve.
- Id string
- The ID of Transport Zone to retrieve.
- Is
Default bool - May be set together with
transport_type
in order to retrieve default Transport Zone for this transport type. - Site
Path string - The path of the site which the Transport Zone belongs to, this configuration is required for global manager only.
path
field of the existingnsxt.PolicySite
can be used here. - Transport
Type string - Transport type of requested Transport Zone, one of
OVERLAY_STANDARD
,OVERLAY_ENS
,OVERLAY_BACKED
,VLAN_BACKED
andUNKNOWN
.
- description String
- The description of the Transport Zone.
- display
Name String - The Display Name prefix of the Transport Zone to retrieve.
- id String
- The ID of Transport Zone to retrieve.
- is
Default Boolean - May be set together with
transport_type
in order to retrieve default Transport Zone for this transport type. - site
Path String - The path of the site which the Transport Zone belongs to, this configuration is required for global manager only.
path
field of the existingnsxt.PolicySite
can be used here. - transport
Type String - Transport type of requested Transport Zone, one of
OVERLAY_STANDARD
,OVERLAY_ENS
,OVERLAY_BACKED
,VLAN_BACKED
andUNKNOWN
.
- description string
- The description of the Transport Zone.
- display
Name string - The Display Name prefix of the Transport Zone to retrieve.
- id string
- The ID of Transport Zone to retrieve.
- is
Default boolean - May be set together with
transport_type
in order to retrieve default Transport Zone for this transport type. - site
Path string - The path of the site which the Transport Zone belongs to, this configuration is required for global manager only.
path
field of the existingnsxt.PolicySite
can be used here. - transport
Type string - Transport type of requested Transport Zone, one of
OVERLAY_STANDARD
,OVERLAY_ENS
,OVERLAY_BACKED
,VLAN_BACKED
andUNKNOWN
.
- description str
- The description of the Transport Zone.
- display_
name str - The Display Name prefix of the Transport Zone to retrieve.
- id str
- The ID of Transport Zone to retrieve.
- is_
default bool - May be set together with
transport_type
in order to retrieve default Transport Zone for this transport type. - site_
path str - The path of the site which the Transport Zone belongs to, this configuration is required for global manager only.
path
field of the existingnsxt.PolicySite
can be used here. - transport_
type str - Transport type of requested Transport Zone, one of
OVERLAY_STANDARD
,OVERLAY_ENS
,OVERLAY_BACKED
,VLAN_BACKED
andUNKNOWN
.
- description String
- The description of the Transport Zone.
- display
Name String - The Display Name prefix of the Transport Zone to retrieve.
- id String
- The ID of Transport Zone to retrieve.
- is
Default Boolean - May be set together with
transport_type
in order to retrieve default Transport Zone for this transport type. - site
Path String - The path of the site which the Transport Zone belongs to, this configuration is required for global manager only.
path
field of the existingnsxt.PolicySite
can be used here. - transport
Type String - Transport type of requested Transport Zone, one of
OVERLAY_STANDARD
,OVERLAY_ENS
,OVERLAY_BACKED
,VLAN_BACKED
andUNKNOWN
.
getPolicyTransportZone Result
The following output properties are available:
- Description string
- The description of the Transport Zone.
- Display
Name string - Id string
- Is
Default bool - A boolean flag indicating if this Transport Zone is the default.
- Path string
- The NSX path of the policy resource.
- Realized
Id string - The id of realized transport zone object. This id should be used in
nsxt.EdgeTransportNode
resource. - Transport
Type string - The transport type of this transport zone.
- Site
Path string
- Description string
- The description of the Transport Zone.
- Display
Name string - Id string
- Is
Default bool - A boolean flag indicating if this Transport Zone is the default.
- Path string
- The NSX path of the policy resource.
- Realized
Id string - The id of realized transport zone object. This id should be used in
nsxt.EdgeTransportNode
resource. - Transport
Type string - The transport type of this transport zone.
- Site
Path string
- description String
- The description of the Transport Zone.
- display
Name String - id String
- is
Default Boolean - A boolean flag indicating if this Transport Zone is the default.
- path String
- The NSX path of the policy resource.
- realized
Id String - The id of realized transport zone object. This id should be used in
nsxt.EdgeTransportNode
resource. - transport
Type String - The transport type of this transport zone.
- site
Path String
- description string
- The description of the Transport Zone.
- display
Name string - id string
- is
Default boolean - A boolean flag indicating if this Transport Zone is the default.
- path string
- The NSX path of the policy resource.
- realized
Id string - The id of realized transport zone object. This id should be used in
nsxt.EdgeTransportNode
resource. - transport
Type string - The transport type of this transport zone.
- site
Path string
- description str
- The description of the Transport Zone.
- display_
name str - id str
- is_
default bool - A boolean flag indicating if this Transport Zone is the default.
- path str
- The NSX path of the policy resource.
- realized_
id str - The id of realized transport zone object. This id should be used in
nsxt.EdgeTransportNode
resource. - transport_
type str - The transport type of this transport zone.
- site_
path str
- description String
- The description of the Transport Zone.
- display
Name String - id String
- is
Default Boolean - A boolean flag indicating if this Transport Zone is the default.
- path String
- The NSX path of the policy resource.
- realized
Id String - The id of realized transport zone object. This id should be used in
nsxt.EdgeTransportNode
resource. - transport
Type String - The transport type of this transport zone.
- site
Path String
Package Details
- Repository
- nsxt vmware/terraform-provider-nsxt
- License
- Notes
- This Pulumi package is based on the
nsxt
Terraform Provider.