published on Friday, Sep 11, 2026 by vmware
published on Friday, Sep 11, 2026 by vmware
This data source provides a way to list effective bare metal server members that belong to a specific NSX-T policy group. This API is applicable only for groups containing BMS member type. For groups containing other member types, it returns an empty list.
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";
const example = nsxt.getPolicyGroupBaremetalServerMembers({
domain: "default",
groupId: "bms-group-id",
});
export const bmsMembers = example.then(example => example.items);
import pulumi
import pulumi_nsxt as nsxt
example = nsxt.get_policy_group_baremetal_server_members(domain="default",
group_id="bms-group-id")
pulumi.export("bmsMembers", example.items)
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 {
example, err := nsxt.GetPolicyGroupBaremetalServerMembers(ctx, &nsxt.GetPolicyGroupBaremetalServerMembersArgs{
Domain: pulumi.StringRef("default"),
GroupId: "bms-group-id",
}, nil)
if err != nil {
return err
}
ctx.Export("bmsMembers", example.Items)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nsxt = Pulumi.Nsxt;
return await Deployment.RunAsync(() =>
{
var example = Nsxt.GetPolicyGroupBaremetalServerMembers.Invoke(new()
{
Domain = "default",
GroupId = "bms-group-id",
});
return new Dictionary<string, object?>
{
["bmsMembers"] = example.Apply(getPolicyGroupBaremetalServerMembersResult => getPolicyGroupBaremetalServerMembersResult.Items),
};
});
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.GetPolicyGroupBaremetalServerMembersArgs;
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 example = NsxtFunctions.getPolicyGroupBaremetalServerMembers(GetPolicyGroupBaremetalServerMembersArgs.builder()
.domain("default")
.groupId("bms-group-id")
.build());
ctx.export("bmsMembers", example.items());
}
}
variables:
example:
fn::invoke:
function: nsxt:getPolicyGroupBaremetalServerMembers
arguments:
domain: default
groupId: bms-group-id
outputs:
bmsMembers: ${example.items}
Example coming soon!
With Group Reference
import * as pulumi from "@pulumi/pulumi";
import * as nsxt from "@pulumi/nsxt";
const bmsGroup = new nsxt.PolicyGroup("bms_group", {
displayName: "bms-static-group",
description: "Group for bare metal servers",
groupType: "BareMetalServer",
criterias: [{
externalIdExpressions: [{
memberType: "BareMetalServer",
externalIds: ["71be0142-2ed1-1d53-9c60-5564cf4b7e2e"],
}],
}],
});
const bmsMembers = nsxt.getPolicyGroupBaremetalServerMembersOutput({
domain: "default",
groupId: bmsGroup.policyGroupId,
});
import pulumi
import pulumi_nsxt as nsxt
bms_group = nsxt.PolicyGroup("bms_group",
display_name="bms-static-group",
description="Group for bare metal servers",
group_type="BareMetalServer",
criterias=[{
"external_id_expressions": [{
"member_type": "BareMetalServer",
"external_ids": ["71be0142-2ed1-1d53-9c60-5564cf4b7e2e"],
}],
}])
bms_members = nsxt.get_policy_group_baremetal_server_members_output(domain="default",
group_id=bms_group.policy_group_id)
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 {
bmsGroup, err := nsxt.NewPolicyGroup(ctx, "bms_group", &nsxt.PolicyGroupArgs{
DisplayName: pulumi.String("bms-static-group"),
Description: pulumi.String("Group for bare metal servers"),
GroupType: pulumi.String("BareMetalServer"),
Criterias: nsxt.PolicyGroupCriteriaArray{
&nsxt.PolicyGroupCriteriaArgs{
ExternalIdExpressions: nsxt.PolicyGroupCriteriaExternalIdExpressionArray{
&nsxt.PolicyGroupCriteriaExternalIdExpressionArgs{
MemberType: pulumi.String("BareMetalServer"),
ExternalIds: pulumi.StringArray{
pulumi.String("71be0142-2ed1-1d53-9c60-5564cf4b7e2e"),
},
},
},
},
},
})
if err != nil {
return err
}
_ = nsxt.GetPolicyGroupBaremetalServerMembersOutput(ctx, nsxt.GetPolicyGroupBaremetalServerMembersOutputArgs{
Domain: pulumi.String("default"),
GroupId: bmsGroup.PolicyGroupId,
}, nil)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nsxt = Pulumi.Nsxt;
return await Deployment.RunAsync(() =>
{
var bmsGroup = new Nsxt.PolicyGroup("bms_group", new()
{
DisplayName = "bms-static-group",
Description = "Group for bare metal servers",
GroupType = "BareMetalServer",
Criterias = new[]
{
new Nsxt.Inputs.PolicyGroupCriteriaArgs
{
ExternalIdExpressions = new[]
{
new Nsxt.Inputs.PolicyGroupCriteriaExternalIdExpressionArgs
{
MemberType = "BareMetalServer",
ExternalIds = new[]
{
"71be0142-2ed1-1d53-9c60-5564cf4b7e2e",
},
},
},
},
},
});
var bmsMembers = Nsxt.GetPolicyGroupBaremetalServerMembers.Invoke(new()
{
Domain = "default",
GroupId = bmsGroup.PolicyGroupId,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.nsxt.PolicyGroup;
import com.pulumi.nsxt.PolicyGroupArgs;
import com.pulumi.nsxt.inputs.PolicyGroupCriteriaArgs;
import com.pulumi.nsxt.NsxtFunctions;
import com.pulumi.nsxt.inputs.GetPolicyGroupBaremetalServerMembersArgs;
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) {
var bmsGroup = new PolicyGroup("bmsGroup", PolicyGroupArgs.builder()
.displayName("bms-static-group")
.description("Group for bare metal servers")
.groupType("BareMetalServer")
.criterias(PolicyGroupCriteriaArgs.builder()
.externalIdExpressions(PolicyGroupCriteriaExternalIdExpressionArgs.builder()
.memberType("BareMetalServer")
.externalIds("71be0142-2ed1-1d53-9c60-5564cf4b7e2e")
.build())
.build())
.build());
final var bmsMembers = NsxtFunctions.getPolicyGroupBaremetalServerMembers(GetPolicyGroupBaremetalServerMembersArgs.builder()
.domain("default")
.groupId(bmsGroup.policyGroupId())
.build());
}
}
resources:
bmsGroup:
type: nsxt:PolicyGroup
name: bms_group
properties:
displayName: bms-static-group
description: Group for bare metal servers
groupType: BareMetalServer
criterias:
- externalIdExpressions:
- memberType: BareMetalServer
externalIds:
- 71be0142-2ed1-1d53-9c60-5564cf4b7e2e
variables:
bmsMembers:
fn::invoke:
function: nsxt:getPolicyGroupBaremetalServerMembers
arguments:
domain: default
groupId: ${bmsGroup.policyGroupId}
Example coming soon!
Using getPolicyGroupBaremetalServerMembers
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 getPolicyGroupBaremetalServerMembers(args: GetPolicyGroupBaremetalServerMembersArgs, opts?: InvokeOptions): Promise<GetPolicyGroupBaremetalServerMembersResult>
function getPolicyGroupBaremetalServerMembersOutput(args: GetPolicyGroupBaremetalServerMembersOutputArgs, opts?: InvokeOutputOptions): Output<GetPolicyGroupBaremetalServerMembersResult>def get_policy_group_baremetal_server_members(domain: Optional[str] = None,
enforcement_point_path: Optional[str] = None,
group_id: Optional[str] = None,
id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetPolicyGroupBaremetalServerMembersResult
def get_policy_group_baremetal_server_members_output(domain: pulumi.Input[Optional[str]] = None,
enforcement_point_path: pulumi.Input[Optional[str]] = None,
group_id: pulumi.Input[Optional[str]] = None,
id: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOutputOptions] = None) -> Output[GetPolicyGroupBaremetalServerMembersResult]func GetPolicyGroupBaremetalServerMembers(ctx *Context, args *GetPolicyGroupBaremetalServerMembersArgs, opts ...InvokeOption) (*GetPolicyGroupBaremetalServerMembersResult, error)
func GetPolicyGroupBaremetalServerMembersOutput(ctx *Context, args *GetPolicyGroupBaremetalServerMembersOutputArgs, opts ...InvokeOption) GetPolicyGroupBaremetalServerMembersResultOutput> Note: This function is named GetPolicyGroupBaremetalServerMembers in the Go SDK.
public static class GetPolicyGroupBaremetalServerMembers
{
public static Task<GetPolicyGroupBaremetalServerMembersResult> InvokeAsync(GetPolicyGroupBaremetalServerMembersArgs args, InvokeOptions? opts = null)
public static Output<GetPolicyGroupBaremetalServerMembersResult> Invoke(GetPolicyGroupBaremetalServerMembersInvokeArgs args, InvokeOptions? opts = null)
public static Output<GetPolicyGroupBaremetalServerMembersResult> Invoke(GetPolicyGroupBaremetalServerMembersInvokeArgs args, InvokeOutputOptions opts)
}public static CompletableFuture<GetPolicyGroupBaremetalServerMembersResult> getPolicyGroupBaremetalServerMembers(GetPolicyGroupBaremetalServerMembersArgs args, InvokeOptions options)
public static Output<GetPolicyGroupBaremetalServerMembersResult> getPolicyGroupBaremetalServerMembers(GetPolicyGroupBaremetalServerMembersArgs args, InvokeOptions options)
public static Output<GetPolicyGroupBaremetalServerMembersResult> getPolicyGroupBaremetalServerMembers(GetPolicyGroupBaremetalServerMembersArgs args, InvokeOutputOptions options)
fn::invoke:
function: nsxt:index/getPolicyGroupBaremetalServerMembers:getPolicyGroupBaremetalServerMembers
arguments:
# arguments dictionarydata "nsxt_get_policy_group_baremetal_server_members" "name" {
# arguments
}The following arguments are supported:
- Group
Id string - ID of the group to read effective bare metal server members.
- Domain string
- Domain ID for the group. Defaults to "default".
- Enforcement
Point stringPath - The path of the enforcement point from which the list of members needs to be fetched.
- Id string
- ID of the group.
- Group
Id string - ID of the group to read effective bare metal server members.
- Domain string
- Domain ID for the group. Defaults to "default".
- Enforcement
Point stringPath - The path of the enforcement point from which the list of members needs to be fetched.
- Id string
- ID of the group.
- group_
id string - ID of the group to read effective bare metal server members.
- domain string
- Domain ID for the group. Defaults to "default".
- enforcement_
point_ stringpath - The path of the enforcement point from which the list of members needs to be fetched.
- id string
- ID of the group.
- group
Id String - ID of the group to read effective bare metal server members.
- domain String
- Domain ID for the group. Defaults to "default".
- enforcement
Point StringPath - The path of the enforcement point from which the list of members needs to be fetched.
- id String
- ID of the group.
- group
Id string - ID of the group to read effective bare metal server members.
- domain string
- Domain ID for the group. Defaults to "default".
- enforcement
Point stringPath - The path of the enforcement point from which the list of members needs to be fetched.
- id string
- ID of the group.
- group_
id str - ID of the group to read effective bare metal server members.
- domain str
- Domain ID for the group. Defaults to "default".
- enforcement_
point_ strpath - The path of the enforcement point from which the list of members needs to be fetched.
- id str
- ID of the group.
- group
Id String - ID of the group to read effective bare metal server members.
- domain String
- Domain ID for the group. Defaults to "default".
- enforcement
Point StringPath - The path of the enforcement point from which the list of members needs to be fetched.
- id String
- ID of the group.
getPolicyGroupBaremetalServerMembers Result
The following output properties are available:
- Group
Id string - Id string
- ID of the group.
- Items
List<Get
Policy Group Baremetal Server Members Item> - List of bare metal server members in the group.
- Domain string
- Enforcement
Point stringPath
- Group
Id string - Id string
- ID of the group.
- Items
[]Get
Policy Group Baremetal Server Members Item - List of bare metal server members in the group.
- Domain string
- Enforcement
Point stringPath
- group_
id string - id string
- ID of the group.
- items list(object)
- List of bare metal server members in the group.
- domain string
- enforcement_
point_ stringpath
- group
Id String - id String
- ID of the group.
- items
List<Get
Policy Group Baremetal Server Members Item> - List of bare metal server members in the group.
- domain String
- enforcement
Point StringPath
- group
Id string - id string
- ID of the group.
- items
Get
Policy Group Baremetal Server Members Item[] - List of bare metal server members in the group.
- domain string
- enforcement
Point stringPath
- group_
id str - id str
- ID of the group.
- items
Sequence[Get
Policy Group Baremetal Server Members Item] - List of bare metal server members in the group.
- domain str
- enforcement_
point_ strpath
- group
Id String - id String
- ID of the group.
- items List<Property Map>
- List of bare metal server members in the group.
- domain String
- enforcement
Point StringPath
Supporting Types
GetPolicyGroupBaremetalServerMembersItem
- Cpu
Cores double - Number of CPU cores on the bare metal server.
- Display
Name string - Display name of the bare metal server.
- External
Id string - External ID of the bare metal server.
- Last
Sync doubleTime - Last synchronization time.
- Os
Name string - Operating system name.
- Os
Version string - Operating system version.
- Source
Id string - Source ID of the bare metal server.
- Cpu
Cores float64 - Number of CPU cores on the bare metal server.
- Display
Name string - Display name of the bare metal server.
- External
Id string - External ID of the bare metal server.
- Last
Sync float64Time - Last synchronization time.
- Os
Name string - Operating system name.
- Os
Version string - Operating system version.
- Source
Id string - Source ID of the bare metal server.
- cpu_
cores number - Number of CPU cores on the bare metal server.
- display_
name string - Display name of the bare metal server.
- external_
id string - External ID of the bare metal server.
- last_
sync_ numbertime - Last synchronization time.
- os_
name string - Operating system name.
- os_
version string - Operating system version.
- source_
id string - Source ID of the bare metal server.
- cpu
Cores Double - Number of CPU cores on the bare metal server.
- display
Name String - Display name of the bare metal server.
- external
Id String - External ID of the bare metal server.
- last
Sync DoubleTime - Last synchronization time.
- os
Name String - Operating system name.
- os
Version String - Operating system version.
- source
Id String - Source ID of the bare metal server.
- cpu
Cores number - Number of CPU cores on the bare metal server.
- display
Name string - Display name of the bare metal server.
- external
Id string - External ID of the bare metal server.
- last
Sync numberTime - Last synchronization time.
- os
Name string - Operating system name.
- os
Version string - Operating system version.
- source
Id string - Source ID of the bare metal server.
- cpu_
cores float - Number of CPU cores on the bare metal server.
- display_
name str - Display name of the bare metal server.
- external_
id str - External ID of the bare metal server.
- last_
sync_ floattime - Last synchronization time.
- os_
name str - Operating system name.
- os_
version str - Operating system version.
- source_
id str - Source ID of the bare metal server.
- cpu
Cores Number - Number of CPU cores on the bare metal server.
- display
Name String - Display name of the bare metal server.
- external
Id String - External ID of the bare metal server.
- last
Sync NumberTime - Last synchronization time.
- os
Name String - Operating system name.
- os
Version String - Operating system version.
- source
Id String - Source ID of the bare metal server.
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