1. Packages
  2. Vultr
  3. API Docs
  4. getBareMetalServer
Vultr v2.23.1 published on Tuesday, Dec 10, 2024 by dirien

vultr.getBareMetalServer

Explore with Pulumi AI

Get information about a Vultr bare metal server.

Example Usage

Get the information for a server by label:

import * as pulumi from "@pulumi/pulumi";
import * as vultr from "@pulumi/vultr";

const myServer = vultr.getBareMetalServer({
    filters: [{
        name: "label",
        values: ["my-server-label"],
    }],
});
Copy
import pulumi
import pulumi_vultr as vultr

my_server = vultr.get_bare_metal_server(filters=[{
    "name": "label",
    "values": ["my-server-label"],
}])
Copy
package main

import (
	"github.com/dirien/pulumi-vultr/sdk/v2/go/vultr"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := vultr.LookupBareMetalServer(ctx, &vultr.LookupBareMetalServerArgs{
			Filters: []vultr.GetBareMetalServerFilter{
				{
					Name: "label",
					Values: []string{
						"my-server-label",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vultr = Pulumi.Vultr;

return await Deployment.RunAsync(() => 
{
    var myServer = Vultr.GetBareMetalServer.Invoke(new()
    {
        Filters = new[]
        {
            new Vultr.Inputs.GetBareMetalServerFilterInputArgs
            {
                Name = "label",
                Values = new[]
                {
                    "my-server-label",
                },
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vultr.VultrFunctions;
import com.pulumi.vultr.inputs.GetBareMetalServerArgs;
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 myServer = VultrFunctions.getBareMetalServer(GetBareMetalServerArgs.builder()
            .filters(GetBareMetalServerFilterArgs.builder()
                .name("label")
                .values("my-server-label")
                .build())
            .build());

    }
}
Copy
variables:
  myServer:
    fn::invoke:
      Function: vultr:getBareMetalServer
      Arguments:
        filters:
          - name: label
            values:
              - my-server-label
Copy

Using getBareMetalServer

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 getBareMetalServer(args: GetBareMetalServerArgs, opts?: InvokeOptions): Promise<GetBareMetalServerResult>
function getBareMetalServerOutput(args: GetBareMetalServerOutputArgs, opts?: InvokeOptions): Output<GetBareMetalServerResult>
Copy
def get_bare_metal_server(filters: Optional[Sequence[GetBareMetalServerFilter]] = None,
                          opts: Optional[InvokeOptions] = None) -> GetBareMetalServerResult
def get_bare_metal_server_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetBareMetalServerFilterArgs]]]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetBareMetalServerResult]
Copy
func LookupBareMetalServer(ctx *Context, args *LookupBareMetalServerArgs, opts ...InvokeOption) (*LookupBareMetalServerResult, error)
func LookupBareMetalServerOutput(ctx *Context, args *LookupBareMetalServerOutputArgs, opts ...InvokeOption) LookupBareMetalServerResultOutput
Copy

> Note: This function is named LookupBareMetalServer in the Go SDK.

public static class GetBareMetalServer 
{
    public static Task<GetBareMetalServerResult> InvokeAsync(GetBareMetalServerArgs args, InvokeOptions? opts = null)
    public static Output<GetBareMetalServerResult> Invoke(GetBareMetalServerInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetBareMetalServerResult> getBareMetalServer(GetBareMetalServerArgs args, InvokeOptions options)
public static Output<GetBareMetalServerResult> getBareMetalServer(GetBareMetalServerArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: vultr:index/getBareMetalServer:getBareMetalServer
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Filters Changes to this property will trigger replacement. List<ediri.Vultr.Inputs.GetBareMetalServerFilter>
Query parameters for finding servers.
Filters Changes to this property will trigger replacement. []GetBareMetalServerFilter
Query parameters for finding servers.
filters Changes to this property will trigger replacement. List<GetBareMetalServerFilter>
Query parameters for finding servers.
filters Changes to this property will trigger replacement. GetBareMetalServerFilter[]
Query parameters for finding servers.
filters Changes to this property will trigger replacement. Sequence[GetBareMetalServerFilter]
Query parameters for finding servers.
filters Changes to this property will trigger replacement. List<Property Map>
Query parameters for finding servers.

getBareMetalServer Result

The following output properties are available:

AppId int
The server's application ID.
CpuCount int
The number of CPUs available on the server.
DateCreated string
The date the server was added to your Vultr account.
Disk string
The description of the disk(s) on the server.
Features List<string>
GatewayV4 string
The server's IPv4 gateway.
Id string
The provider-assigned unique ID for this managed resource.
ImageId string
The Marketplace ID for this application.
Label string
The server's label.
MacAddress int
MainIp string
The server's main IP address.
NetmaskV4 string
The server's IPv4 netmask.
Os string
The operating system of the server.
OsId int
The server's operating system ID.
Plan string
The server's plan ID.
Ram string
The amount of memory available on the server in MB.
Region string
The region ID of the server.
Status string
The status of the server's subscription.
Tags List<string>
A list of tags applied to the server.
UserScheme string
The scheme used for the default user (linux servers only).
V6MainIp string
V6Network string
V6NetworkSize int
Vpc2Ids List<string>
A list of VPC 2.0 IDs attached to the server.
Filters List<ediri.Vultr.Outputs.GetBareMetalServerFilter>
AppId int
The server's application ID.
CpuCount int
The number of CPUs available on the server.
DateCreated string
The date the server was added to your Vultr account.
Disk string
The description of the disk(s) on the server.
Features []string
GatewayV4 string
The server's IPv4 gateway.
Id string
The provider-assigned unique ID for this managed resource.
ImageId string
The Marketplace ID for this application.
Label string
The server's label.
MacAddress int
MainIp string
The server's main IP address.
NetmaskV4 string
The server's IPv4 netmask.
Os string
The operating system of the server.
OsId int
The server's operating system ID.
Plan string
The server's plan ID.
Ram string
The amount of memory available on the server in MB.
Region string
The region ID of the server.
Status string
The status of the server's subscription.
Tags []string
A list of tags applied to the server.
UserScheme string
The scheme used for the default user (linux servers only).
V6MainIp string
V6Network string
V6NetworkSize int
Vpc2Ids []string
A list of VPC 2.0 IDs attached to the server.
Filters []GetBareMetalServerFilter
appId Integer
The server's application ID.
cpuCount Integer
The number of CPUs available on the server.
dateCreated String
The date the server was added to your Vultr account.
disk String
The description of the disk(s) on the server.
features List<String>
gatewayV4 String
The server's IPv4 gateway.
id String
The provider-assigned unique ID for this managed resource.
imageId String
The Marketplace ID for this application.
label String
The server's label.
macAddress Integer
mainIp String
The server's main IP address.
netmaskV4 String
The server's IPv4 netmask.
os String
The operating system of the server.
osId Integer
The server's operating system ID.
plan String
The server's plan ID.
ram String
The amount of memory available on the server in MB.
region String
The region ID of the server.
status String
The status of the server's subscription.
tags List<String>
A list of tags applied to the server.
userScheme String
The scheme used for the default user (linux servers only).
v6MainIp String
v6Network String
v6NetworkSize Integer
vpc2Ids List<String>
A list of VPC 2.0 IDs attached to the server.
filters List<GetBareMetalServerFilter>
appId number
The server's application ID.
cpuCount number
The number of CPUs available on the server.
dateCreated string
The date the server was added to your Vultr account.
disk string
The description of the disk(s) on the server.
features string[]
gatewayV4 string
The server's IPv4 gateway.
id string
The provider-assigned unique ID for this managed resource.
imageId string
The Marketplace ID for this application.
label string
The server's label.
macAddress number
mainIp string
The server's main IP address.
netmaskV4 string
The server's IPv4 netmask.
os string
The operating system of the server.
osId number
The server's operating system ID.
plan string
The server's plan ID.
ram string
The amount of memory available on the server in MB.
region string
The region ID of the server.
status string
The status of the server's subscription.
tags string[]
A list of tags applied to the server.
userScheme string
The scheme used for the default user (linux servers only).
v6MainIp string
v6Network string
v6NetworkSize number
vpc2Ids string[]
A list of VPC 2.0 IDs attached to the server.
filters GetBareMetalServerFilter[]
app_id int
The server's application ID.
cpu_count int
The number of CPUs available on the server.
date_created str
The date the server was added to your Vultr account.
disk str
The description of the disk(s) on the server.
features Sequence[str]
gateway_v4 str
The server's IPv4 gateway.
id str
The provider-assigned unique ID for this managed resource.
image_id str
The Marketplace ID for this application.
label str
The server's label.
mac_address int
main_ip str
The server's main IP address.
netmask_v4 str
The server's IPv4 netmask.
os str
The operating system of the server.
os_id int
The server's operating system ID.
plan str
The server's plan ID.
ram str
The amount of memory available on the server in MB.
region str
The region ID of the server.
status str
The status of the server's subscription.
tags Sequence[str]
A list of tags applied to the server.
user_scheme str
The scheme used for the default user (linux servers only).
v6_main_ip str
v6_network str
v6_network_size int
vpc2_ids Sequence[str]
A list of VPC 2.0 IDs attached to the server.
filters Sequence[GetBareMetalServerFilter]
appId Number
The server's application ID.
cpuCount Number
The number of CPUs available on the server.
dateCreated String
The date the server was added to your Vultr account.
disk String
The description of the disk(s) on the server.
features List<String>
gatewayV4 String
The server's IPv4 gateway.
id String
The provider-assigned unique ID for this managed resource.
imageId String
The Marketplace ID for this application.
label String
The server's label.
macAddress Number
mainIp String
The server's main IP address.
netmaskV4 String
The server's IPv4 netmask.
os String
The operating system of the server.
osId Number
The server's operating system ID.
plan String
The server's plan ID.
ram String
The amount of memory available on the server in MB.
region String
The region ID of the server.
status String
The status of the server's subscription.
tags List<String>
A list of tags applied to the server.
userScheme String
The scheme used for the default user (linux servers only).
v6MainIp String
v6Network String
v6NetworkSize Number
vpc2Ids List<String>
A list of VPC 2.0 IDs attached to the server.
filters List<Property Map>

Supporting Types

GetBareMetalServerFilter

Name This property is required. string
Attribute name to filter with.
Values This property is required. List<string>
One or more values filter with.
Name This property is required. string
Attribute name to filter with.
Values This property is required. []string
One or more values filter with.
name This property is required. String
Attribute name to filter with.
values This property is required. List<String>
One or more values filter with.
name This property is required. string
Attribute name to filter with.
values This property is required. string[]
One or more values filter with.
name This property is required. str
Attribute name to filter with.
values This property is required. Sequence[str]
One or more values filter with.
name This property is required. String
Attribute name to filter with.
values This property is required. List<String>
One or more values filter with.

Package Details

Repository
vultr dirien/pulumi-vultr
License
Apache-2.0
Notes
This Pulumi package is based on the vultr Terraform Provider.