published on Friday, Sep 11, 2026 by vmware
published on Friday, Sep 11, 2026 by vmware
This data source provides information about policy groups for which the given bare metal server interface is a member. This is useful for discovering group membership and understanding network segmentation.
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 groups that a specific bare metal server interface belongs to
const if1Groups = nsxt.getPolicyBaremetalServerInterfaceGroupAssociations({
externalId: "71be0142-2ed1-1d53-9c60-02005b4b7246",
});
// Define the data-network group referenced in the security policy
const data_network = new nsxt.PolicyGroup("data-network", {
displayName: "Data-Network-Group",
description: "Group containing data network interfaces",
criterias: [{
conditions: [{
key: "Tag",
memberType: "BareMetalServerInterface",
operator: "EQUALS",
value: "network_zone|data",
}],
}],
});
// Use the groups in security policies
const interfacePolicy = new nsxt.PolicySecurityPolicy("interface_policy", {
displayName: "BMS Interface Security Policy",
category: "Infrastructure",
rules: [{
displayName: "Allow Interface Traffic",
sourceGroups: if1Groups.then(if1Groups => if1Groups.groups.map(__item => __item.path)),
destinationGroups: [data_network.path],
action: "ALLOW",
services: [],
}],
});
export const interfaceGroups = if1Groups.then(if1Groups => .reduce((__obj, group) => ({ ...__obj, [group.displayName]: group.path })));
import pulumi
import pulumi_nsxt as nsxt
# Get groups that a specific bare metal server interface belongs to
if1_groups = nsxt.get_policy_baremetal_server_interface_group_associations(external_id="71be0142-2ed1-1d53-9c60-02005b4b7246")
# Define the data-network group referenced in the security policy
data_network = nsxt.PolicyGroup("data-network",
display_name="Data-Network-Group",
description="Group containing data network interfaces",
criterias=[{
"conditions": [{
"key": "Tag",
"member_type": "BareMetalServerInterface",
"operator": "EQUALS",
"value": "network_zone|data",
}],
}])
# Use the groups in security policies
interface_policy = nsxt.PolicySecurityPolicy("interface_policy",
display_name="BMS Interface Security Policy",
category="Infrastructure",
rules=[{
"display_name": "Allow Interface Traffic",
"source_groups": [__item.path for __item in if1_groups.groups],
"destination_groups": [data_network.path],
"action": "ALLOW",
"services": [],
}])
pulumi.export("interfaceGroups", {group.display_name: group.path for group in if1_groups.groups})
Example coming soon!
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nsxt = Pulumi.Nsxt;
return await Deployment.RunAsync(() =>
{
// Get groups that a specific bare metal server interface belongs to
var if1Groups = Nsxt.GetPolicyBaremetalServerInterfaceGroupAssociations.Invoke(new()
{
ExternalId = "71be0142-2ed1-1d53-9c60-02005b4b7246",
});
// Define the data-network group referenced in the security policy
var data_network = new Nsxt.PolicyGroup("data-network", new()
{
DisplayName = "Data-Network-Group",
Description = "Group containing data network interfaces",
Criterias = new[]
{
new Nsxt.Inputs.PolicyGroupCriteriaArgs
{
Conditions = new[]
{
new Nsxt.Inputs.PolicyGroupCriteriaConditionArgs
{
Key = "Tag",
MemberType = "BareMetalServerInterface",
Operator = "EQUALS",
Value = "network_zone|data",
},
},
},
},
});
// Use the groups in security policies
var interfacePolicy = new Nsxt.PolicySecurityPolicy("interface_policy", new()
{
DisplayName = "BMS Interface Security Policy",
Category = "Infrastructure",
Rules = new[]
{
new Nsxt.Inputs.PolicySecurityPolicyRuleArgs
{
DisplayName = "Allow Interface Traffic",
SourceGroups = if1Groups.Apply(getPolicyBaremetalServerInterfaceGroupAssociationsResult => getPolicyBaremetalServerInterfaceGroupAssociationsResult.Groups).Select(__item => __item.Path).ToList(),
DestinationGroups = new[]
{
data_network.Path,
},
Action = "ALLOW",
Services = new() { },
},
},
});
return new Dictionary<string, object?>
{
["interfaceGroups"] = .ToDictionary(item => {
var group = item.Value;
return @group.DisplayName;
}, item => {
var group = item.Value;
return @group.Path;
}),
};
});
Example coming soon!
Example coming soon!
Example coming soon!
Using getPolicyBaremetalServerInterfaceGroupAssociations
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 getPolicyBaremetalServerInterfaceGroupAssociations(args: GetPolicyBaremetalServerInterfaceGroupAssociationsArgs, opts?: InvokeOptions): Promise<GetPolicyBaremetalServerInterfaceGroupAssociationsResult>
function getPolicyBaremetalServerInterfaceGroupAssociationsOutput(args: GetPolicyBaremetalServerInterfaceGroupAssociationsOutputArgs, opts?: InvokeOutputOptions): Output<GetPolicyBaremetalServerInterfaceGroupAssociationsResult>def get_policy_baremetal_server_interface_group_associations(enforcement_point_path: Optional[str] = None,
external_id: Optional[str] = None,
id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetPolicyBaremetalServerInterfaceGroupAssociationsResult
def get_policy_baremetal_server_interface_group_associations_output(enforcement_point_path: pulumi.Input[Optional[str]] = None,
external_id: pulumi.Input[Optional[str]] = None,
id: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOutputOptions] = None) -> Output[GetPolicyBaremetalServerInterfaceGroupAssociationsResult]func GetPolicyBaremetalServerInterfaceGroupAssociations(ctx *Context, args *GetPolicyBaremetalServerInterfaceGroupAssociationsArgs, opts ...InvokeOption) (*GetPolicyBaremetalServerInterfaceGroupAssociationsResult, error)
func GetPolicyBaremetalServerInterfaceGroupAssociationsOutput(ctx *Context, args *GetPolicyBaremetalServerInterfaceGroupAssociationsOutputArgs, opts ...InvokeOption) GetPolicyBaremetalServerInterfaceGroupAssociationsResultOutput> Note: This function is named GetPolicyBaremetalServerInterfaceGroupAssociations in the Go SDK.
public static class GetPolicyBaremetalServerInterfaceGroupAssociations
{
public static Task<GetPolicyBaremetalServerInterfaceGroupAssociationsResult> InvokeAsync(GetPolicyBaremetalServerInterfaceGroupAssociationsArgs args, InvokeOptions? opts = null)
public static Output<GetPolicyBaremetalServerInterfaceGroupAssociationsResult> Invoke(GetPolicyBaremetalServerInterfaceGroupAssociationsInvokeArgs args, InvokeOptions? opts = null)
public static Output<GetPolicyBaremetalServerInterfaceGroupAssociationsResult> Invoke(GetPolicyBaremetalServerInterfaceGroupAssociationsInvokeArgs args, InvokeOutputOptions opts)
}public static CompletableFuture<GetPolicyBaremetalServerInterfaceGroupAssociationsResult> getPolicyBaremetalServerInterfaceGroupAssociations(GetPolicyBaremetalServerInterfaceGroupAssociationsArgs args, InvokeOptions options)
public static Output<GetPolicyBaremetalServerInterfaceGroupAssociationsResult> getPolicyBaremetalServerInterfaceGroupAssociations(GetPolicyBaremetalServerInterfaceGroupAssociationsArgs args, InvokeOptions options)
public static Output<GetPolicyBaremetalServerInterfaceGroupAssociationsResult> getPolicyBaremetalServerInterfaceGroupAssociations(GetPolicyBaremetalServerInterfaceGroupAssociationsArgs args, InvokeOutputOptions options)
fn::invoke:
function: nsxt:index/getPolicyBaremetalServerInterfaceGroupAssociations:getPolicyBaremetalServerInterfaceGroupAssociations
arguments:
# arguments dictionarydata "nsxt_get_policy_baremetal_server_interface_group_associations" "name" {
# arguments
}The following arguments are supported:
- External
Id string - External ID of the bare metal server interface.
- Enforcement
Point stringPath - Path of the enforcement point.
- Id string
- ID of the data source.
- External
Id string - External ID of the bare metal server interface.
- Enforcement
Point stringPath - Path of the enforcement point.
- Id string
- ID of the data source.
- external_
id string - External ID of the bare metal server interface.
- enforcement_
point_ stringpath - Path of the enforcement point.
- id string
- ID of the data source.
- external
Id String - External ID of the bare metal server interface.
- enforcement
Point StringPath - Path of the enforcement point.
- id String
- ID of the data source.
- external
Id string - External ID of the bare metal server interface.
- enforcement
Point stringPath - Path of the enforcement point.
- id string
- ID of the data source.
- external_
id str - External ID of the bare metal server interface.
- enforcement_
point_ strpath - Path of the enforcement point.
- id str
- ID of the data source.
- external
Id String - External ID of the bare metal server interface.
- enforcement
Point StringPath - Path of the enforcement point.
- id String
- ID of the data source.
getPolicyBaremetalServerInterfaceGroupAssociations Result
The following output properties are available:
- External
Id string - Groups
List<Get
Policy Baremetal Server Interface Group Associations Group> - List of groups this bare metal server interface is a member of. Each group contains:
- Id string
- ID of the data source.
- Enforcement
Point stringPath
- External
Id string - Groups
[]Get
Policy Baremetal Server Interface Group Associations Group - List of groups this bare metal server interface is a member of. Each group contains:
- Id string
- ID of the data source.
- Enforcement
Point stringPath
- external_
id string - groups list(object)
- List of groups this bare metal server interface is a member of. Each group contains:
- id string
- ID of the data source.
- enforcement_
point_ stringpath
- external
Id String - groups
List<Get
Policy Baremetal Server Interface Group Associations Group> - List of groups this bare metal server interface is a member of. Each group contains:
- id String
- ID of the data source.
- enforcement
Point StringPath
- external
Id string - groups
Get
Policy Baremetal Server Interface Group Associations Group[] - List of groups this bare metal server interface is a member of. Each group contains:
- id string
- ID of the data source.
- enforcement
Point stringPath
- external_
id str - groups
Sequence[Get
Policy Baremetal Server Interface Group Associations Group] - List of groups this bare metal server interface is a member of. Each group contains:
- id str
- ID of the data source.
- enforcement_
point_ strpath
- external
Id String - groups List<Property Map>
- List of groups this bare metal server interface is a member of. Each group contains:
- id String
- ID of the data source.
- enforcement
Point StringPath
Supporting Types
GetPolicyBaremetalServerInterfaceGroupAssociationsGroup
- Display
Name string - Display name of the group.
- Is
Valid bool - Indicates if the referenced NSX resource is valid.
- Path string
- Policy path of the group.
- Target
Type string - Type of the target resource.
- Display
Name string - Display name of the group.
- Is
Valid bool - Indicates if the referenced NSX resource is valid.
- Path string
- Policy path of the group.
- Target
Type string - Type of the target resource.
- display_
name string - Display name of the group.
- is_
valid bool - Indicates if the referenced NSX resource is valid.
- path string
- Policy path of the group.
- target_
type string - Type of the target resource.
- display
Name String - Display name of the group.
- is
Valid Boolean - Indicates if the referenced NSX resource is valid.
- path String
- Policy path of the group.
- target
Type String - Type of the target resource.
- display
Name string - Display name of the group.
- is
Valid boolean - Indicates if the referenced NSX resource is valid.
- path string
- Policy path of the group.
- target
Type string - Type of the target resource.
- display_
name str - Display name of the group.
- is_
valid bool - Indicates if the referenced NSX resource is valid.
- path str
- Policy path of the group.
- target_
type str - Type of the target resource.
- display
Name String - Display name of the group.
- is
Valid Boolean - Indicates if the referenced NSX resource is valid.
- path String
- Policy path of the group.
- target
Type String - Type of the target resource.
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