1. Registry
  2. Packages
  3. Nsxt Provider
  4. API Docs
  5. PolicyBaremetalServerTags
Viewing docs for nsxt 3.12.1
published on Friday, Sep 11, 2026 by vmware
Viewing docs for nsxt 3.12.1
published on Friday, Sep 11, 2026 by vmware

    This resource provides a way to configure tags on Bare Metal Servers discovered and managed by NSX-T. Tags applied to bare metal servers can be used in dynamic group membership criteria and security policies.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as nsxt from "@pulumi/nsxt";
    
    // Discover bare metal servers
    const productionServers = nsxt.getPolicyBaremetalServers({});
    // Apply tags to a specific bare metal server
    const webServerTags = new nsxt.PolicyBaremetalServerTags("web_server_tags", {
        externalId: productionServers.then(productionServers => productionServers.results?.[0]?.externalId),
        tags: [
            {
                scope: "environment",
                tag: "production",
            },
            {
                scope: "application",
                tag: "web-server",
            },
            {
                scope: "owner",
                tag: "platform-team",
            },
        ],
    });
    // Use tagged servers in a dynamic group
    const productionWebServers = new nsxt.PolicyGroup("production_web_servers", {
        displayName: "Production-Web-Servers",
        description: "Dynamic group of production web servers",
        groupType: "BareMetalServer",
        criterias: [
            {
                conditions: [{
                    key: "Tag",
                    memberType: "BareMetalServer",
                    operator: "EQUALS",
                    value: "environment|production",
                }],
            },
            {
                conditions: [{
                    key: "Tag",
                    memberType: "BareMetalServer",
                    operator: "EQUALS",
                    value: "application|web-server",
                }],
            },
        ],
        conjunctions: [{
            operator: "AND",
        }],
    });
    // Define required services
    const http = new nsxt.PolicyService("http", {
        displayName: "HTTP-Service",
        l4PortSetEntries: [{
            protocol: "TCP",
            destinationPorts: ["80"],
        }],
    });
    const https = new nsxt.PolicyService("https", {
        displayName: "HTTPS-Service",
        l4PortSetEntries: [{
            protocol: "TCP",
            destinationPorts: ["443"],
        }],
    });
    // Apply security policy to tagged servers
    const webServerSecurity = new nsxt.PolicySecurityPolicy("web_server_security", {
        displayName: "Web-Server-Security",
        description: "Security policy for web servers",
        category: "Application",
        rules: [{
            displayName: "Allow-HTTP-HTTPS",
            sourceGroups: [],
            destinationGroups: [productionWebServers.path],
            action: "ALLOW",
            services: [
                http.path,
                https.path,
            ],
            logged: true,
        }],
    });
    
    import pulumi
    import pulumi_nsxt as nsxt
    
    # Discover bare metal servers
    production_servers = nsxt.get_policy_baremetal_servers()
    # Apply tags to a specific bare metal server
    web_server_tags = nsxt.PolicyBaremetalServerTags("web_server_tags",
        external_id=production_servers.results[0].external_id,
        tags=[
            {
                "scope": "environment",
                "tag": "production",
            },
            {
                "scope": "application",
                "tag": "web-server",
            },
            {
                "scope": "owner",
                "tag": "platform-team",
            },
        ])
    # Use tagged servers in a dynamic group
    production_web_servers = nsxt.PolicyGroup("production_web_servers",
        display_name="Production-Web-Servers",
        description="Dynamic group of production web servers",
        group_type="BareMetalServer",
        criterias=[
            {
                "conditions": [{
                    "key": "Tag",
                    "member_type": "BareMetalServer",
                    "operator": "EQUALS",
                    "value": "environment|production",
                }],
            },
            {
                "conditions": [{
                    "key": "Tag",
                    "member_type": "BareMetalServer",
                    "operator": "EQUALS",
                    "value": "application|web-server",
                }],
            },
        ],
        conjunctions=[{
            "operator": "AND",
        }])
    # Define required services
    http = nsxt.PolicyService("http",
        display_name="HTTP-Service",
        l4_port_set_entries=[{
            "protocol": "TCP",
            "destination_ports": ["80"],
        }])
    https = nsxt.PolicyService("https",
        display_name="HTTPS-Service",
        l4_port_set_entries=[{
            "protocol": "TCP",
            "destination_ports": ["443"],
        }])
    # Apply security policy to tagged servers
    web_server_security = nsxt.PolicySecurityPolicy("web_server_security",
        display_name="Web-Server-Security",
        description="Security policy for web servers",
        category="Application",
        rules=[{
            "display_name": "Allow-HTTP-HTTPS",
            "source_groups": [],
            "destination_groups": [production_web_servers.path],
            "action": "ALLOW",
            "services": [
                http.path,
                https.path,
            ],
            "logged": True,
        }])
    
    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 {
    		// Discover bare metal servers
    		productionServers, err := nsxt.LookupPolicyBaremetalServers(ctx, &nsxt.LookupPolicyBaremetalServersArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		// Apply tags to a specific bare metal server
    		_, err = nsxt.NewPolicyBaremetalServerTags(ctx, "web_server_tags", &nsxt.PolicyBaremetalServerTagsArgs{
    			ExternalId: pulumi.String(productionServers.Results[0].ExternalId),
    			Tags: nsxt.PolicyBaremetalServerTagsTagArray{
    				&nsxt.PolicyBaremetalServerTagsTagArgs{
    					Scope: pulumi.String("environment"),
    					Tag:   pulumi.String("production"),
    				},
    				&nsxt.PolicyBaremetalServerTagsTagArgs{
    					Scope: pulumi.String("application"),
    					Tag:   pulumi.String("web-server"),
    				},
    				&nsxt.PolicyBaremetalServerTagsTagArgs{
    					Scope: pulumi.String("owner"),
    					Tag:   pulumi.String("platform-team"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		// Use tagged servers in a dynamic group
    		productionWebServers, err := nsxt.NewPolicyGroup(ctx, "production_web_servers", &nsxt.PolicyGroupArgs{
    			DisplayName: pulumi.String("Production-Web-Servers"),
    			Description: pulumi.String("Dynamic group of production web servers"),
    			GroupType:   pulumi.String("BareMetalServer"),
    			Criterias: nsxt.PolicyGroupCriteriaArray{
    				&nsxt.PolicyGroupCriteriaArgs{
    					Conditions: nsxt.PolicyGroupCriteriaConditionArray{
    						&nsxt.PolicyGroupCriteriaConditionArgs{
    							Key:        pulumi.String("Tag"),
    							MemberType: pulumi.String("BareMetalServer"),
    							Operator:   pulumi.String("EQUALS"),
    							Value:      pulumi.String("environment|production"),
    						},
    					},
    				},
    				&nsxt.PolicyGroupCriteriaArgs{
    					Conditions: nsxt.PolicyGroupCriteriaConditionArray{
    						&nsxt.PolicyGroupCriteriaConditionArgs{
    							Key:        pulumi.String("Tag"),
    							MemberType: pulumi.String("BareMetalServer"),
    							Operator:   pulumi.String("EQUALS"),
    							Value:      pulumi.String("application|web-server"),
    						},
    					},
    				},
    			},
    			Conjunctions: nsxt.PolicyGroupConjunctionArray{
    				&nsxt.PolicyGroupConjunctionArgs{
    					Operator: pulumi.String("AND"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		// Define required services
    		http, err := nsxt.NewPolicyService(ctx, "http", &nsxt.PolicyServiceArgs{
    			DisplayName: pulumi.String("HTTP-Service"),
    			L4PortSetEntries: nsxt.PolicyServiceL4PortSetEntryArray{
    				&nsxt.PolicyServiceL4PortSetEntryArgs{
    					Protocol: pulumi.String("TCP"),
    					DestinationPorts: pulumi.StringArray{
    						pulumi.String("80"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		https, err := nsxt.NewPolicyService(ctx, "https", &nsxt.PolicyServiceArgs{
    			DisplayName: pulumi.String("HTTPS-Service"),
    			L4PortSetEntries: nsxt.PolicyServiceL4PortSetEntryArray{
    				&nsxt.PolicyServiceL4PortSetEntryArgs{
    					Protocol: pulumi.String("TCP"),
    					DestinationPorts: pulumi.StringArray{
    						pulumi.String("443"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		// Apply security policy to tagged servers
    		_, err = nsxt.NewPolicySecurityPolicy(ctx, "web_server_security", &nsxt.PolicySecurityPolicyArgs{
    			DisplayName: pulumi.String("Web-Server-Security"),
    			Description: pulumi.String("Security policy for web servers"),
    			Category:    pulumi.String("Application"),
    			Rules: nsxt.PolicySecurityPolicyRuleTypeArray{
    				&nsxt.PolicySecurityPolicyRuleTypeArgs{
    					DisplayName:  pulumi.String("Allow-HTTP-HTTPS"),
    					SourceGroups: pulumi.StringArray{},
    					DestinationGroups: pulumi.StringArray{
    						productionWebServers.Path,
    					},
    					Action: pulumi.String("ALLOW"),
    					Services: pulumi.StringArray{
    						http.Path,
    						https.Path,
    					},
    					Logged: pulumi.Bool(true),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Nsxt = Pulumi.Nsxt;
    
    return await Deployment.RunAsync(() => 
    {
        // Discover bare metal servers
        var productionServers = Nsxt.GetPolicyBaremetalServers.Invoke();
    
        // Apply tags to a specific bare metal server
        var webServerTags = new Nsxt.PolicyBaremetalServerTags("web_server_tags", new()
        {
            ExternalId = productionServers.Apply(getPolicyBaremetalServersResult => getPolicyBaremetalServersResult.Results[0]?.ExternalId),
            Tags = new[]
            {
                new Nsxt.Inputs.PolicyBaremetalServerTagsTagArgs
                {
                    Scope = "environment",
                    Tag = "production",
                },
                new Nsxt.Inputs.PolicyBaremetalServerTagsTagArgs
                {
                    Scope = "application",
                    Tag = "web-server",
                },
                new Nsxt.Inputs.PolicyBaremetalServerTagsTagArgs
                {
                    Scope = "owner",
                    Tag = "platform-team",
                },
            },
        });
    
        // Use tagged servers in a dynamic group
        var productionWebServers = new Nsxt.PolicyGroup("production_web_servers", new()
        {
            DisplayName = "Production-Web-Servers",
            Description = "Dynamic group of production web servers",
            GroupType = "BareMetalServer",
            Criterias = new[]
            {
                new Nsxt.Inputs.PolicyGroupCriteriaArgs
                {
                    Conditions = new[]
                    {
                        new Nsxt.Inputs.PolicyGroupCriteriaConditionArgs
                        {
                            Key = "Tag",
                            MemberType = "BareMetalServer",
                            Operator = "EQUALS",
                            Value = "environment|production",
                        },
                    },
                },
                new Nsxt.Inputs.PolicyGroupCriteriaArgs
                {
                    Conditions = new[]
                    {
                        new Nsxt.Inputs.PolicyGroupCriteriaConditionArgs
                        {
                            Key = "Tag",
                            MemberType = "BareMetalServer",
                            Operator = "EQUALS",
                            Value = "application|web-server",
                        },
                    },
                },
            },
            Conjunctions = new[]
            {
                new Nsxt.Inputs.PolicyGroupConjunctionArgs
                {
                    Operator = "AND",
                },
            },
        });
    
        // Define required services
        var http = new Nsxt.PolicyService("http", new()
        {
            DisplayName = "HTTP-Service",
            L4PortSetEntries = new[]
            {
                new Nsxt.Inputs.PolicyServiceL4PortSetEntryArgs
                {
                    Protocol = "TCP",
                    DestinationPorts = new[]
                    {
                        "80",
                    },
                },
            },
        });
    
        var https = new Nsxt.PolicyService("https", new()
        {
            DisplayName = "HTTPS-Service",
            L4PortSetEntries = new[]
            {
                new Nsxt.Inputs.PolicyServiceL4PortSetEntryArgs
                {
                    Protocol = "TCP",
                    DestinationPorts = new[]
                    {
                        "443",
                    },
                },
            },
        });
    
        // Apply security policy to tagged servers
        var webServerSecurity = new Nsxt.PolicySecurityPolicy("web_server_security", new()
        {
            DisplayName = "Web-Server-Security",
            Description = "Security policy for web servers",
            Category = "Application",
            Rules = new[]
            {
                new Nsxt.Inputs.PolicySecurityPolicyRuleArgs
                {
                    DisplayName = "Allow-HTTP-HTTPS",
                    SourceGroups = new() { },
                    DestinationGroups = new[]
                    {
                        productionWebServers.Path,
                    },
                    Action = "ALLOW",
                    Services = new[]
                    {
                        http.Path,
                        https.Path,
                    },
                    Logged = true,
                },
            },
        });
    
    });
    
    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.GetPolicyBaremetalServersArgs;
    import com.pulumi.nsxt.PolicyBaremetalServerTags;
    import com.pulumi.nsxt.PolicyBaremetalServerTagsArgs;
    import com.pulumi.nsxt.inputs.PolicyBaremetalServerTagsTagArgs;
    import com.pulumi.nsxt.PolicyGroup;
    import com.pulumi.nsxt.PolicyGroupArgs;
    import com.pulumi.nsxt.inputs.PolicyGroupCriteriaArgs;
    import com.pulumi.nsxt.inputs.PolicyGroupConjunctionArgs;
    import com.pulumi.nsxt.PolicyService;
    import com.pulumi.nsxt.PolicyServiceArgs;
    import com.pulumi.nsxt.inputs.PolicyServiceL4PortSetEntryArgs;
    import com.pulumi.nsxt.PolicySecurityPolicy;
    import com.pulumi.nsxt.PolicySecurityPolicyArgs;
    import com.pulumi.nsxt.inputs.PolicySecurityPolicyRuleArgs;
    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) {
            // Discover bare metal servers
            final var productionServers = NsxtFunctions.getPolicyBaremetalServers(GetPolicyBaremetalServersArgs.builder()
                .build());
    
            // Apply tags to a specific bare metal server
            var webServerTags = new PolicyBaremetalServerTags("webServerTags", PolicyBaremetalServerTagsArgs.builder()
                .externalId(productionServers.results()[0].externalId())
                .tags(            
                    PolicyBaremetalServerTagsTagArgs.builder()
                        .scope("environment")
                        .tag("production")
                        .build(),
                    PolicyBaremetalServerTagsTagArgs.builder()
                        .scope("application")
                        .tag("web-server")
                        .build(),
                    PolicyBaremetalServerTagsTagArgs.builder()
                        .scope("owner")
                        .tag("platform-team")
                        .build())
                .build());
    
            // Use tagged servers in a dynamic group
            var productionWebServers = new PolicyGroup("productionWebServers", PolicyGroupArgs.builder()
                .displayName("Production-Web-Servers")
                .description("Dynamic group of production web servers")
                .groupType("BareMetalServer")
                .criterias(            
                    PolicyGroupCriteriaArgs.builder()
                        .conditions(PolicyGroupCriteriaConditionArgs.builder()
                            .key("Tag")
                            .memberType("BareMetalServer")
                            .operator("EQUALS")
                            .value("environment|production")
                            .build())
                        .build(),
                    PolicyGroupCriteriaArgs.builder()
                        .conditions(PolicyGroupCriteriaConditionArgs.builder()
                            .key("Tag")
                            .memberType("BareMetalServer")
                            .operator("EQUALS")
                            .value("application|web-server")
                            .build())
                        .build())
                .conjunctions(PolicyGroupConjunctionArgs.builder()
                    .operator("AND")
                    .build())
                .build());
    
            // Define required services
            var http = new PolicyService("http", PolicyServiceArgs.builder()
                .displayName("HTTP-Service")
                .l4PortSetEntries(PolicyServiceL4PortSetEntryArgs.builder()
                    .protocol("TCP")
                    .destinationPorts("80")
                    .build())
                .build());
    
            var https = new PolicyService("https", PolicyServiceArgs.builder()
                .displayName("HTTPS-Service")
                .l4PortSetEntries(PolicyServiceL4PortSetEntryArgs.builder()
                    .protocol("TCP")
                    .destinationPorts("443")
                    .build())
                .build());
    
            // Apply security policy to tagged servers
            var webServerSecurity = new PolicySecurityPolicy("webServerSecurity", PolicySecurityPolicyArgs.builder()
                .displayName("Web-Server-Security")
                .description("Security policy for web servers")
                .category("Application")
                .rules(PolicySecurityPolicyRuleArgs.builder()
                    .displayName("Allow-HTTP-HTTPS")
                    .sourceGroups()
                    .destinationGroups(productionWebServers.path())
                    .action("ALLOW")
                    .services(                
                        http.path(),
                        https.path())
                    .logged(true)
                    .build())
                .build());
    
        }
    }
    
    resources:
      # Apply tags to a specific bare metal server
      webServerTags:
        type: nsxt:PolicyBaremetalServerTags
        name: web_server_tags
        properties:
          externalId: ${productionServers.results[0].externalId}
          tags:
            - scope: environment
              tag: production
            - scope: application
              tag: web-server
            - scope: owner
              tag: platform-team
      # Use tagged servers in a dynamic group
      productionWebServers:
        type: nsxt:PolicyGroup
        name: production_web_servers
        properties:
          displayName: Production-Web-Servers
          description: Dynamic group of production web servers
          groupType: BareMetalServer
          criterias:
            - conditions:
                - key: Tag
                  memberType: BareMetalServer
                  operator: EQUALS
                  value: environment|production
            - conditions:
                - key: Tag
                  memberType: BareMetalServer
                  operator: EQUALS
                  value: application|web-server
          conjunctions:
            - operator: AND
      # Define required services
      http:
        type: nsxt:PolicyService
        properties:
          displayName: HTTP-Service
          l4PortSetEntries:
            - protocol: TCP
              destinationPorts:
                - '80'
      https:
        type: nsxt:PolicyService
        properties:
          displayName: HTTPS-Service
          l4PortSetEntries:
            - protocol: TCP
              destinationPorts:
                - '443'
      # Apply security policy to tagged servers
      webServerSecurity:
        type: nsxt:PolicySecurityPolicy
        name: web_server_security
        properties:
          displayName: Web-Server-Security
          description: Security policy for web servers
          category: Application
          rules:
            - displayName: Allow-HTTP-HTTPS
              sourceGroups: []
              destinationGroups:
                - ${productionWebServers.path}
              action: ALLOW
              services:
                - ${http.path}
                - ${https.path}
              logged: true
    variables:
      # Discover bare metal servers
      productionServers:
        fn::invoke:
          function: nsxt:getPolicyBaremetalServers
          arguments: {}
    
    Example coming soon!
    

    Create PolicyBaremetalServerTags Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new PolicyBaremetalServerTags(name: string, args: PolicyBaremetalServerTagsArgs, opts?: CustomResourceOptions);
    @overload
    def PolicyBaremetalServerTags(resource_name: str,
                                  args: PolicyBaremetalServerTagsArgs,
                                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def PolicyBaremetalServerTags(resource_name: str,
                                  opts: Optional[ResourceOptions] = None,
                                  external_id: Optional[str] = None,
                                  policy_baremetal_server_tags_id: Optional[str] = None,
                                  tags: Optional[Sequence[PolicyBaremetalServerTagsTagArgs]] = None)
    func NewPolicyBaremetalServerTags(ctx *Context, name string, args PolicyBaremetalServerTagsArgs, opts ...ResourceOption) (*PolicyBaremetalServerTags, error)
    public PolicyBaremetalServerTags(string name, PolicyBaremetalServerTagsArgs args, CustomResourceOptions? opts = null)
    public PolicyBaremetalServerTags(String name, PolicyBaremetalServerTagsArgs args)
    public PolicyBaremetalServerTags(String name, PolicyBaremetalServerTagsArgs args, CustomResourceOptions options)
    
    type: nsxt:PolicyBaremetalServerTags
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "nsxt_policy_baremetal_server_tags" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args PolicyBaremetalServerTagsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args PolicyBaremetalServerTagsArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args PolicyBaremetalServerTagsArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PolicyBaremetalServerTagsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PolicyBaremetalServerTagsArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var policyBaremetalServerTagsResource = new Nsxt.PolicyBaremetalServerTags("policyBaremetalServerTagsResource", new()
    {
        ExternalId = "string",
        PolicyBaremetalServerTagsId = "string",
        Tags = new[]
        {
            new Nsxt.Inputs.PolicyBaremetalServerTagsTagArgs
            {
                Scope = "string",
                Tag = "string",
            },
        },
    });
    
    example, err := nsxt.NewPolicyBaremetalServerTags(ctx, "policyBaremetalServerTagsResource", &nsxt.PolicyBaremetalServerTagsArgs{
    	ExternalId:                  pulumi.String("string"),
    	PolicyBaremetalServerTagsId: pulumi.String("string"),
    	Tags: nsxt.PolicyBaremetalServerTagsTagArray{
    		&nsxt.PolicyBaremetalServerTagsTagArgs{
    			Scope: pulumi.String("string"),
    			Tag:   pulumi.String("string"),
    		},
    	},
    })
    
    resource "nsxt_policy_baremetal_server_tags" "policyBaremetalServerTagsResource" {
      lifecycle {
        create_before_destroy = true
      }
      external_id                     = "string"
      policy_baremetal_server_tags_id = "string"
      tags {
        scope = "string"
        tag   = "string"
      }
    }
    
    var policyBaremetalServerTagsResource = new PolicyBaremetalServerTags("policyBaremetalServerTagsResource", PolicyBaremetalServerTagsArgs.builder()
        .externalId("string")
        .policyBaremetalServerTagsId("string")
        .tags(PolicyBaremetalServerTagsTagArgs.builder()
            .scope("string")
            .tag("string")
            .build())
        .build());
    
    policy_baremetal_server_tags_resource = nsxt.PolicyBaremetalServerTags("policyBaremetalServerTagsResource",
        external_id="string",
        policy_baremetal_server_tags_id="string",
        tags=[{
            "scope": "string",
            "tag": "string",
        }])
    
    const policyBaremetalServerTagsResource = new nsxt.PolicyBaremetalServerTags("policyBaremetalServerTagsResource", {
        externalId: "string",
        policyBaremetalServerTagsId: "string",
        tags: [{
            scope: "string",
            tag: "string",
        }],
    });
    
    type: nsxt:PolicyBaremetalServerTags
    properties:
        externalId: string
        policyBaremetalServerTagsId: string
        tags:
            - scope: string
              tag: string
    

    PolicyBaremetalServerTags Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The PolicyBaremetalServerTags resource accepts the following input properties:

    ExternalId string
    External ID of the bare metal server to tag. This is typically obtained from the nsxt.getPolicyBaremetalServers data source.
    PolicyBaremetalServerTagsId string
    ID of the bare metal server being tagged.
    Tags List<PolicyBaremetalServerTagsTag>
    A list of scope + tag pairs to associate with this bare metal server. Default is empty (no tags applied).
    ExternalId string
    External ID of the bare metal server to tag. This is typically obtained from the nsxt.getPolicyBaremetalServers data source.
    PolicyBaremetalServerTagsId string
    ID of the bare metal server being tagged.
    Tags []PolicyBaremetalServerTagsTagArgs
    A list of scope + tag pairs to associate with this bare metal server. Default is empty (no tags applied).
    external_id string
    External ID of the bare metal server to tag. This is typically obtained from the nsxt.getPolicyBaremetalServers data source.
    policy_baremetal_server_tags_id string
    ID of the bare metal server being tagged.
    tags list(object)
    A list of scope + tag pairs to associate with this bare metal server. Default is empty (no tags applied).
    externalId String
    External ID of the bare metal server to tag. This is typically obtained from the nsxt.getPolicyBaremetalServers data source.
    policyBaremetalServerTagsId String
    ID of the bare metal server being tagged.
    tags List<PolicyBaremetalServerTagsTag>
    A list of scope + tag pairs to associate with this bare metal server. Default is empty (no tags applied).
    externalId string
    External ID of the bare metal server to tag. This is typically obtained from the nsxt.getPolicyBaremetalServers data source.
    policyBaremetalServerTagsId string
    ID of the bare metal server being tagged.
    tags PolicyBaremetalServerTagsTag[]
    A list of scope + tag pairs to associate with this bare metal server. Default is empty (no tags applied).
    external_id str
    External ID of the bare metal server to tag. This is typically obtained from the nsxt.getPolicyBaremetalServers data source.
    policy_baremetal_server_tags_id str
    ID of the bare metal server being tagged.
    tags Sequence[PolicyBaremetalServerTagsTagArgs]
    A list of scope + tag pairs to associate with this bare metal server. Default is empty (no tags applied).
    externalId String
    External ID of the bare metal server to tag. This is typically obtained from the nsxt.getPolicyBaremetalServers data source.
    policyBaremetalServerTagsId String
    ID of the bare metal server being tagged.
    tags List<Property Map>
    A list of scope + tag pairs to associate with this bare metal server. Default is empty (no tags applied).

    Outputs

    All input properties are implicitly available as output properties. Additionally, the PolicyBaremetalServerTags resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing PolicyBaremetalServerTags Resource

    Get an existing PolicyBaremetalServerTags resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: PolicyBaremetalServerTagsState, opts?: CustomResourceOptions): PolicyBaremetalServerTags
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            external_id: Optional[str] = None,
            policy_baremetal_server_tags_id: Optional[str] = None,
            tags: Optional[Sequence[PolicyBaremetalServerTagsTagArgs]] = None) -> PolicyBaremetalServerTags
    func GetPolicyBaremetalServerTags(ctx *Context, name string, id IDInput, state *PolicyBaremetalServerTagsState, opts ...ResourceOption) (*PolicyBaremetalServerTags, error)
    public static PolicyBaremetalServerTags Get(string name, Input<string> id, PolicyBaremetalServerTagsState? state, CustomResourceOptions? opts = null)
    public static PolicyBaremetalServerTags get(String name, Output<String> id, PolicyBaremetalServerTagsState state, CustomResourceOptions options)
    resources:  _:    type: nsxt:PolicyBaremetalServerTags    get:      id: ${id}
    import {
      to = nsxt_policy_baremetal_server_tags.example
      id = "${id}"
    }
    
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ExternalId string
    External ID of the bare metal server to tag. This is typically obtained from the nsxt.getPolicyBaremetalServers data source.
    PolicyBaremetalServerTagsId string
    ID of the bare metal server being tagged.
    Tags List<PolicyBaremetalServerTagsTag>
    A list of scope + tag pairs to associate with this bare metal server. Default is empty (no tags applied).
    ExternalId string
    External ID of the bare metal server to tag. This is typically obtained from the nsxt.getPolicyBaremetalServers data source.
    PolicyBaremetalServerTagsId string
    ID of the bare metal server being tagged.
    Tags []PolicyBaremetalServerTagsTagArgs
    A list of scope + tag pairs to associate with this bare metal server. Default is empty (no tags applied).
    external_id string
    External ID of the bare metal server to tag. This is typically obtained from the nsxt.getPolicyBaremetalServers data source.
    policy_baremetal_server_tags_id string
    ID of the bare metal server being tagged.
    tags list(object)
    A list of scope + tag pairs to associate with this bare metal server. Default is empty (no tags applied).
    externalId String
    External ID of the bare metal server to tag. This is typically obtained from the nsxt.getPolicyBaremetalServers data source.
    policyBaremetalServerTagsId String
    ID of the bare metal server being tagged.
    tags List<PolicyBaremetalServerTagsTag>
    A list of scope + tag pairs to associate with this bare metal server. Default is empty (no tags applied).
    externalId string
    External ID of the bare metal server to tag. This is typically obtained from the nsxt.getPolicyBaremetalServers data source.
    policyBaremetalServerTagsId string
    ID of the bare metal server being tagged.
    tags PolicyBaremetalServerTagsTag[]
    A list of scope + tag pairs to associate with this bare metal server. Default is empty (no tags applied).
    external_id str
    External ID of the bare metal server to tag. This is typically obtained from the nsxt.getPolicyBaremetalServers data source.
    policy_baremetal_server_tags_id str
    ID of the bare metal server being tagged.
    tags Sequence[PolicyBaremetalServerTagsTagArgs]
    A list of scope + tag pairs to associate with this bare metal server. Default is empty (no tags applied).
    externalId String
    External ID of the bare metal server to tag. This is typically obtained from the nsxt.getPolicyBaremetalServers data source.
    policyBaremetalServerTagsId String
    ID of the bare metal server being tagged.
    tags List<Property Map>
    A list of scope + tag pairs to associate with this bare metal server. Default is empty (no tags applied).

    Supporting Types

    PolicyBaremetalServerTagsTag, PolicyBaremetalServerTagsTagArgs

    Scope string
    Tag scope.
    Tag string
    Tag value.
    Scope string
    Tag scope.
    Tag string
    Tag value.
    scope string
    Tag scope.
    tag string
    Tag value.
    scope String
    Tag scope.
    tag String
    Tag value.
    scope string
    Tag scope.
    tag string
    Tag value.
    scope str
    Tag scope.
    tag str
    Tag value.
    scope String
    Tag scope.
    tag String
    Tag value.

    Import

    An NSX Policy Bare Metal Server Tags resource can be imported using the bare metal server external ID:

    $ pulumi import nsxt:index/policyBaremetalServerTags:PolicyBaremetalServerTags web_server_tags 71be0142-2ed1-1d53-9c60-5564cf4b7e2e
    

    The above command imports the bare metal server tags for the server with external ID 71be0142-2ed1-1d53-9c60-5564cf4b7e2e.

    To learn more about importing existing cloud resources, see Importing resources.

    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.1
    published on Friday, Sep 11, 2026 by vmware

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial