published on Friday, Sep 11, 2026 by vmware
published on Friday, Sep 11, 2026 by vmware
This data source provides information about bare metal server interfaces discovered by NSX with advanced server-side filtering capabilities including tag-based search, parent server filtering, and regex support.
This data source is applicable to NSX Policy Manager and requires NSX-T version 9.0.0 or higher (Bare Metal Server support)
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as nsxt from "@pulumi/nsxt";
// Get all bare metal server interfaces
const allInterfaces = nsxt.getPolicyBaremetalServerInterfaces({});
// Filter by parent bare metal server
const bm1Interfaces = nsxt.getPolicyBaremetalServerInterfaces({
bmsExternalId: "71be0142-2ed1-1d53-9c60-5564cf4b7e2e",
});
// Filter by network role using server-side tag filtering
const dataInterfaces = nsxt.getPolicyBaremetalServerInterfaces({
tagScope: "network_role",
tag: "data",
});
// Filter by interface name using regex
const ethInterfaces = nsxt.getPolicyBaremetalServerInterfaces({
displayName: "eth.*",
});
// Multiple filters
const prodDataEth = nsxt.getPolicyBaremetalServerInterfaces({
bmsExternalId: prod.results[0].externalId,
displayName: "eth.*",
tagScope: "network_role",
tag: "data",
});
export const interfaceIps = dataInterfaces.then(dataInterfaces => .map(i => (i.ipAddresses)));
import pulumi
import pulumi_nsxt as nsxt
# Get all bare metal server interfaces
all_interfaces = nsxt.get_policy_baremetal_server_interfaces()
# Filter by parent bare metal server
bm1_interfaces = nsxt.get_policy_baremetal_server_interfaces(bms_external_id="71be0142-2ed1-1d53-9c60-5564cf4b7e2e")
# Filter by network role using server-side tag filtering
data_interfaces = nsxt.get_policy_baremetal_server_interfaces(tag_scope="network_role",
tag="data")
# Filter by interface name using regex
eth_interfaces = nsxt.get_policy_baremetal_server_interfaces(display_name="eth.*")
# Multiple filters
prod_data_eth = nsxt.get_policy_baremetal_server_interfaces(bms_external_id=prod["results"][0]["externalId"],
display_name="eth.*",
tag_scope="network_role",
tag="data")
pulumi.export("interfaceIps", [i.ip_addresses for i in data_interfaces.results])
Example coming soon!
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nsxt = Pulumi.Nsxt;
return await Deployment.RunAsync(() =>
{
// Get all bare metal server interfaces
var allInterfaces = Nsxt.GetPolicyBaremetalServerInterfaces.Invoke();
// Filter by parent bare metal server
var bm1Interfaces = Nsxt.GetPolicyBaremetalServerInterfaces.Invoke(new()
{
BmsExternalId = "71be0142-2ed1-1d53-9c60-5564cf4b7e2e",
});
// Filter by network role using server-side tag filtering
var dataInterfaces = Nsxt.GetPolicyBaremetalServerInterfaces.Invoke(new()
{
TagScope = "network_role",
Tag = "data",
});
// Filter by interface name using regex
var ethInterfaces = Nsxt.GetPolicyBaremetalServerInterfaces.Invoke(new()
{
DisplayName = "eth.*",
});
// Multiple filters
var prodDataEth = Nsxt.GetPolicyBaremetalServerInterfaces.Invoke(new()
{
BmsExternalId = prod.Results[0].ExternalId,
DisplayName = "eth.*",
TagScope = "network_role",
Tag = "data",
});
return new Dictionary<string, object?>
{
["interfaceIps"] = .Select(i =>
{
return i.IpAddresses;
}).ToList(),
};
});
Example coming soon!
Example coming soon!
Example coming soon!
Using getPolicyBaremetalServerInterfaces
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 getPolicyBaremetalServerInterfaces(args: GetPolicyBaremetalServerInterfacesArgs, opts?: InvokeOptions): Promise<GetPolicyBaremetalServerInterfacesResult>
function getPolicyBaremetalServerInterfacesOutput(args: GetPolicyBaremetalServerInterfacesOutputArgs, opts?: InvokeOutputOptions): Output<GetPolicyBaremetalServerInterfacesResult>def get_policy_baremetal_server_interfaces(bms_external_id: Optional[str] = None,
display_name: Optional[str] = None,
id: Optional[str] = None,
source_id: Optional[str] = None,
tag: Optional[str] = None,
tag_scope: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetPolicyBaremetalServerInterfacesResult
def get_policy_baremetal_server_interfaces_output(bms_external_id: pulumi.Input[Optional[str]] = None,
display_name: pulumi.Input[Optional[str]] = None,
id: pulumi.Input[Optional[str]] = None,
source_id: pulumi.Input[Optional[str]] = None,
tag: pulumi.Input[Optional[str]] = None,
tag_scope: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOutputOptions] = None) -> Output[GetPolicyBaremetalServerInterfacesResult]func LookupPolicyBaremetalServerInterfaces(ctx *Context, args *LookupPolicyBaremetalServerInterfacesArgs, opts ...InvokeOption) (*LookupPolicyBaremetalServerInterfacesResult, error)
func LookupPolicyBaremetalServerInterfacesOutput(ctx *Context, args *LookupPolicyBaremetalServerInterfacesOutputArgs, opts ...InvokeOption) LookupPolicyBaremetalServerInterfacesResultOutput> Note: This function is named LookupPolicyBaremetalServerInterfaces in the Go SDK.
public static class GetPolicyBaremetalServerInterfaces
{
public static Task<GetPolicyBaremetalServerInterfacesResult> InvokeAsync(GetPolicyBaremetalServerInterfacesArgs args, InvokeOptions? opts = null)
public static Output<GetPolicyBaremetalServerInterfacesResult> Invoke(GetPolicyBaremetalServerInterfacesInvokeArgs args, InvokeOptions? opts = null)
public static Output<GetPolicyBaremetalServerInterfacesResult> Invoke(GetPolicyBaremetalServerInterfacesInvokeArgs args, InvokeOutputOptions opts)
}public static CompletableFuture<GetPolicyBaremetalServerInterfacesResult> getPolicyBaremetalServerInterfaces(GetPolicyBaremetalServerInterfacesArgs args, InvokeOptions options)
public static Output<GetPolicyBaremetalServerInterfacesResult> getPolicyBaremetalServerInterfaces(GetPolicyBaremetalServerInterfacesArgs args, InvokeOptions options)
public static Output<GetPolicyBaremetalServerInterfacesResult> getPolicyBaremetalServerInterfaces(GetPolicyBaremetalServerInterfacesArgs args, InvokeOutputOptions options)
fn::invoke:
function: nsxt:index/getPolicyBaremetalServerInterfaces:getPolicyBaremetalServerInterfaces
arguments:
# arguments dictionarydata "nsxt_get_policy_baremetal_server_interfaces" "name" {
# arguments
}The following arguments are supported:
- Bms
External stringId - Filter by parent bare metal server external ID. Default is empty (no filtering).
- Display
Name string - Regex pattern to filter bare metal server interfaces by display name. Default is empty (no filtering).
- Id string
- ID of the data source.
- Source
Id string - Filter by source (bare metal controller) ID. Default is empty (no filtering).
- Tag string
- Filter by tag value. This filter is applied server-side for better performance. Default is empty (no filtering).
- string
- Filter by tag scope. This filter is applied server-side for better performance. Default is empty (no filtering).
- Bms
External stringId - Filter by parent bare metal server external ID. Default is empty (no filtering).
- Display
Name string - Regex pattern to filter bare metal server interfaces by display name. Default is empty (no filtering).
- Id string
- ID of the data source.
- Source
Id string - Filter by source (bare metal controller) ID. Default is empty (no filtering).
- Tag string
- Filter by tag value. This filter is applied server-side for better performance. Default is empty (no filtering).
- string
- Filter by tag scope. This filter is applied server-side for better performance. Default is empty (no filtering).
- bms_
external_ stringid - Filter by parent bare metal server external ID. Default is empty (no filtering).
- display_
name string - Regex pattern to filter bare metal server interfaces by display name. Default is empty (no filtering).
- id string
- ID of the data source.
- source_
id string - Filter by source (bare metal controller) ID. Default is empty (no filtering).
- tag string
- Filter by tag value. This filter is applied server-side for better performance. Default is empty (no filtering).
- tag_
scope string - Filter by tag scope. This filter is applied server-side for better performance. Default is empty (no filtering).
- bms
External StringId - Filter by parent bare metal server external ID. Default is empty (no filtering).
- display
Name String - Regex pattern to filter bare metal server interfaces by display name. Default is empty (no filtering).
- id String
- ID of the data source.
- source
Id String - Filter by source (bare metal controller) ID. Default is empty (no filtering).
- tag String
- Filter by tag value. This filter is applied server-side for better performance. Default is empty (no filtering).
- String
- Filter by tag scope. This filter is applied server-side for better performance. Default is empty (no filtering).
- bms
External stringId - Filter by parent bare metal server external ID. Default is empty (no filtering).
- display
Name string - Regex pattern to filter bare metal server interfaces by display name. Default is empty (no filtering).
- id string
- ID of the data source.
- source
Id string - Filter by source (bare metal controller) ID. Default is empty (no filtering).
- tag string
- Filter by tag value. This filter is applied server-side for better performance. Default is empty (no filtering).
- string
- Filter by tag scope. This filter is applied server-side for better performance. Default is empty (no filtering).
- bms_
external_ strid - Filter by parent bare metal server external ID. Default is empty (no filtering).
- display_
name str - Regex pattern to filter bare metal server interfaces by display name. Default is empty (no filtering).
- id str
- ID of the data source.
- source_
id str - Filter by source (bare metal controller) ID. Default is empty (no filtering).
- tag str
- Filter by tag value. This filter is applied server-side for better performance. Default is empty (no filtering).
- tag_
scope str - Filter by tag scope. This filter is applied server-side for better performance. Default is empty (no filtering).
- bms
External StringId - Filter by parent bare metal server external ID. Default is empty (no filtering).
- display
Name String - Regex pattern to filter bare metal server interfaces by display name. Default is empty (no filtering).
- id String
- ID of the data source.
- source
Id String - Filter by source (bare metal controller) ID. Default is empty (no filtering).
- tag String
- Filter by tag value. This filter is applied server-side for better performance. Default is empty (no filtering).
- String
- Filter by tag scope. This filter is applied server-side for better performance. Default is empty (no filtering).
getPolicyBaremetalServerInterfaces Result
The following output properties are available:
- Id string
- ID of the data source.
- Results
List<Get
Policy Baremetal Server Interfaces Result> - List of bare metal server interfaces matching the criteria. Each interface contains:
- Bms
External stringId - External ID of the parent bare metal server.
- Display
Name string - Display name of the bare metal server interface.
- Source
Id string - Source ID of the bare metal server interface.
- Tag string
- Tag value.
- string
- Id string
- ID of the data source.
- Results
[]Get
Policy Baremetal Server Interfaces Result - List of bare metal server interfaces matching the criteria. Each interface contains:
- Bms
External stringId - External ID of the parent bare metal server.
- Display
Name string - Display name of the bare metal server interface.
- Source
Id string - Source ID of the bare metal server interface.
- Tag string
- Tag value.
- string
- id string
- ID of the data source.
- results list(object)
- List of bare metal server interfaces matching the criteria. Each interface contains:
- bms_
external_ stringid - External ID of the parent bare metal server.
- display_
name string - Display name of the bare metal server interface.
- source_
id string - Source ID of the bare metal server interface.
- tag string
- Tag value.
- tag_
scope string
- id String
- ID of the data source.
- results
List<Get
Policy Baremetal Server Interfaces Result> - List of bare metal server interfaces matching the criteria. Each interface contains:
- bms
External StringId - External ID of the parent bare metal server.
- display
Name String - Display name of the bare metal server interface.
- source
Id String - Source ID of the bare metal server interface.
- tag String
- Tag value.
- String
- id string
- ID of the data source.
- results
Get
Policy Baremetal Server Interfaces Result[] - List of bare metal server interfaces matching the criteria. Each interface contains:
- bms
External stringId - External ID of the parent bare metal server.
- display
Name string - Display name of the bare metal server interface.
- source
Id string - Source ID of the bare metal server interface.
- tag string
- Tag value.
- string
- id str
- ID of the data source.
- results
Sequence[Get
Policy Baremetal Server Interfaces Result] - List of bare metal server interfaces matching the criteria. Each interface contains:
- bms_
external_ strid - External ID of the parent bare metal server.
- display_
name str - Display name of the bare metal server interface.
- source_
id str - Source ID of the bare metal server interface.
- tag str
- Tag value.
- tag_
scope str
- id String
- ID of the data source.
- results List<Property Map>
- List of bare metal server interfaces matching the criteria. Each interface contains:
- bms
External StringId - External ID of the parent bare metal server.
- display
Name String - Display name of the bare metal server interface.
- source
Id String - Source ID of the bare metal server interface.
- tag String
- Tag value.
- String
Supporting Types
GetPolicyBaremetalServerInterfacesResult
- Bms
External stringId - Filter by parent bare metal server external ID. Default is empty (no filtering).
- Display
Name string - Regex pattern to filter bare metal server interfaces by display name. Default is empty (no filtering).
- External
Id string - External ID of the bare metal server interface.
- Ip
Addresses List<string> - List of IP addresses assigned to the interface.
- Is
Mgmt boolInterface - Whether this is a management interface.
- Last
Sync doubleTime - Last synchronization time.
- Resource
Type string - Resource type.
- Source
Id string - Filter by source (bare metal controller) ID. Default is empty (no filtering).
- State string
- State of the interface (UP, DOWN, etc.).
-
List<Get
Policy Baremetal Server Interfaces Result Tag> - List of tags applied to the interface. Each tag contains:
- Bms
External stringId - Filter by parent bare metal server external ID. Default is empty (no filtering).
- Display
Name string - Regex pattern to filter bare metal server interfaces by display name. Default is empty (no filtering).
- External
Id string - External ID of the bare metal server interface.
- Ip
Addresses []string - List of IP addresses assigned to the interface.
- Is
Mgmt boolInterface - Whether this is a management interface.
- Last
Sync float64Time - Last synchronization time.
- Resource
Type string - Resource type.
- Source
Id string - Filter by source (bare metal controller) ID. Default is empty (no filtering).
- State string
- State of the interface (UP, DOWN, etc.).
-
[]Get
Policy Baremetal Server Interfaces Result Tag - List of tags applied to the interface. Each tag contains:
- bms_
external_ stringid - Filter by parent bare metal server external ID. Default is empty (no filtering).
- display_
name string - Regex pattern to filter bare metal server interfaces by display name. Default is empty (no filtering).
- external_
id string - External ID of the bare metal server interface.
- ip_
addresses list(string) - List of IP addresses assigned to the interface.
- is_
mgmt_ boolinterface - Whether this is a management interface.
- last_
sync_ numbertime - Last synchronization time.
- resource_
type string - Resource type.
- source_
id string - Filter by source (bare metal controller) ID. Default is empty (no filtering).
- state string
- State of the interface (UP, DOWN, etc.).
- list(object)
- List of tags applied to the interface. Each tag contains:
- bms
External StringId - Filter by parent bare metal server external ID. Default is empty (no filtering).
- display
Name String - Regex pattern to filter bare metal server interfaces by display name. Default is empty (no filtering).
- external
Id String - External ID of the bare metal server interface.
- ip
Addresses List<String> - List of IP addresses assigned to the interface.
- is
Mgmt BooleanInterface - Whether this is a management interface.
- last
Sync DoubleTime - Last synchronization time.
- resource
Type String - Resource type.
- source
Id String - Filter by source (bare metal controller) ID. Default is empty (no filtering).
- state String
- State of the interface (UP, DOWN, etc.).
-
List<Get
Policy Baremetal Server Interfaces Result Tag> - List of tags applied to the interface. Each tag contains:
- bms
External stringId - Filter by parent bare metal server external ID. Default is empty (no filtering).
- display
Name string - Regex pattern to filter bare metal server interfaces by display name. Default is empty (no filtering).
- external
Id string - External ID of the bare metal server interface.
- ip
Addresses string[] - List of IP addresses assigned to the interface.
- is
Mgmt booleanInterface - Whether this is a management interface.
- last
Sync numberTime - Last synchronization time.
- resource
Type string - Resource type.
- source
Id string - Filter by source (bare metal controller) ID. Default is empty (no filtering).
- state string
- State of the interface (UP, DOWN, etc.).
-
Get
Policy Baremetal Server Interfaces Result Tag[] - List of tags applied to the interface. Each tag contains:
- bms_
external_ strid - Filter by parent bare metal server external ID. Default is empty (no filtering).
- display_
name str - Regex pattern to filter bare metal server interfaces by display name. Default is empty (no filtering).
- external_
id str - External ID of the bare metal server interface.
- ip_
addresses Sequence[str] - List of IP addresses assigned to the interface.
- is_
mgmt_ boolinterface - Whether this is a management interface.
- last_
sync_ floattime - Last synchronization time.
- resource_
type str - Resource type.
- source_
id str - Filter by source (bare metal controller) ID. Default is empty (no filtering).
- state str
- State of the interface (UP, DOWN, etc.).
-
Sequence[Get
Policy Baremetal Server Interfaces Result Tag] - List of tags applied to the interface. Each tag contains:
- bms
External StringId - Filter by parent bare metal server external ID. Default is empty (no filtering).
- display
Name String - Regex pattern to filter bare metal server interfaces by display name. Default is empty (no filtering).
- external
Id String - External ID of the bare metal server interface.
- ip
Addresses List<String> - List of IP addresses assigned to the interface.
- is
Mgmt BooleanInterface - Whether this is a management interface.
- last
Sync NumberTime - Last synchronization time.
- resource
Type String - Resource type.
- source
Id String - Filter by source (bare metal controller) ID. Default is empty (no filtering).
- state String
- State of the interface (UP, DOWN, etc.).
- List<Property Map>
- List of tags applied to the interface. Each tag contains:
GetPolicyBaremetalServerInterfacesResultTag
Package Details
- Repository
- nsxt vmware/terraform-provider-nsxt
- License
- Notes
- This Pulumi package is based on the
nsxtTerraform Provider.
published on Friday, Sep 11, 2026 by vmware