ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud
ibm.getComputeBareMetal
Explore with Pulumi AI
Retrieve information of an existing bare metal as a read-only data source. For more details, about compute bare metal, see compute services.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
const bareMetal = ibm.getComputeBareMetal({
globalIdentifier: "a471e9a6-82e7-41a7-ac8d-39ced672c0ed",
});
import pulumi
import pulumi_ibm as ibm
bare_metal = ibm.get_compute_bare_metal(global_identifier="a471e9a6-82e7-41a7-ac8d-39ced672c0ed")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ibm.LookupComputeBareMetal(ctx, &ibm.LookupComputeBareMetalArgs{
GlobalIdentifier: pulumi.StringRef("a471e9a6-82e7-41a7-ac8d-39ced672c0ed"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;
return await Deployment.RunAsync(() =>
{
var bareMetal = Ibm.GetComputeBareMetal.Invoke(new()
{
GlobalIdentifier = "a471e9a6-82e7-41a7-ac8d-39ced672c0ed",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.IbmFunctions;
import com.pulumi.ibm.inputs.GetComputeBareMetalArgs;
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 bareMetal = IbmFunctions.getComputeBareMetal(GetComputeBareMetalArgs.builder()
.globalIdentifier("a471e9a6-82e7-41a7-ac8d-39ced672c0ed")
.build());
}
}
variables:
bareMetal:
fn::invoke:
function: ibm:getComputeBareMetal
arguments:
globalIdentifier: a471e9a6-82e7-41a7-ac8d-39ced672c0ed
Using getComputeBareMetal
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 getComputeBareMetal(args: GetComputeBareMetalArgs, opts?: InvokeOptions): Promise<GetComputeBareMetalResult>
function getComputeBareMetalOutput(args: GetComputeBareMetalOutputArgs, opts?: InvokeOptions): Output<GetComputeBareMetalResult>
def get_compute_bare_metal(domain: Optional[str] = None,
global_identifier: Optional[str] = None,
hostname: Optional[str] = None,
id: Optional[str] = None,
most_recent: Optional[bool] = None,
opts: Optional[InvokeOptions] = None) -> GetComputeBareMetalResult
def get_compute_bare_metal_output(domain: Optional[pulumi.Input[str]] = None,
global_identifier: Optional[pulumi.Input[str]] = None,
hostname: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
most_recent: Optional[pulumi.Input[bool]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetComputeBareMetalResult]
func LookupComputeBareMetal(ctx *Context, args *LookupComputeBareMetalArgs, opts ...InvokeOption) (*LookupComputeBareMetalResult, error)
func LookupComputeBareMetalOutput(ctx *Context, args *LookupComputeBareMetalOutputArgs, opts ...InvokeOption) LookupComputeBareMetalResultOutput
> Note: This function is named LookupComputeBareMetal
in the Go SDK.
public static class GetComputeBareMetal
{
public static Task<GetComputeBareMetalResult> InvokeAsync(GetComputeBareMetalArgs args, InvokeOptions? opts = null)
public static Output<GetComputeBareMetalResult> Invoke(GetComputeBareMetalInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetComputeBareMetalResult> getComputeBareMetal(GetComputeBareMetalArgs args, InvokeOptions options)
public static Output<GetComputeBareMetalResult> getComputeBareMetal(GetComputeBareMetalArgs args, InvokeOptions options)
fn::invoke:
function: ibm:index/getComputeBareMetal:getComputeBareMetal
arguments:
# arguments dictionary
The following arguments are supported:
- Domain string
- The domain of the Bare Metal server. If you specify this option, do not specify
global_identifier
at the same time. - Global
Identifier string - The unique global identifier of the Bare Metal server. To see global identifier, log in to the IBM Cloud Classic Infrastructure API, that uses your API key as the password. If you specify this option, do not specify
hostname
,domain
, ormost_recent
at the same time. - Hostname string
- The hostname of the Bare Metal server. If you specify the
hostname
, do not specifyglobal_identifier
at the same time. - Id string
- (String) The unique identifier of the Bare Metal server.
- Most
Recent bool - For multiple Bare Metal services, you can set this argument to true to import only the most recently created server. If you specify this option, do not specify
global_identifier
at the same time.
- Domain string
- The domain of the Bare Metal server. If you specify this option, do not specify
global_identifier
at the same time. - Global
Identifier string - The unique global identifier of the Bare Metal server. To see global identifier, log in to the IBM Cloud Classic Infrastructure API, that uses your API key as the password. If you specify this option, do not specify
hostname
,domain
, ormost_recent
at the same time. - Hostname string
- The hostname of the Bare Metal server. If you specify the
hostname
, do not specifyglobal_identifier
at the same time. - Id string
- (String) The unique identifier of the Bare Metal server.
- Most
Recent bool - For multiple Bare Metal services, you can set this argument to true to import only the most recently created server. If you specify this option, do not specify
global_identifier
at the same time.
- domain String
- The domain of the Bare Metal server. If you specify this option, do not specify
global_identifier
at the same time. - global
Identifier String - The unique global identifier of the Bare Metal server. To see global identifier, log in to the IBM Cloud Classic Infrastructure API, that uses your API key as the password. If you specify this option, do not specify
hostname
,domain
, ormost_recent
at the same time. - hostname String
- The hostname of the Bare Metal server. If you specify the
hostname
, do not specifyglobal_identifier
at the same time. - id String
- (String) The unique identifier of the Bare Metal server.
- most
Recent Boolean - For multiple Bare Metal services, you can set this argument to true to import only the most recently created server. If you specify this option, do not specify
global_identifier
at the same time.
- domain string
- The domain of the Bare Metal server. If you specify this option, do not specify
global_identifier
at the same time. - global
Identifier string - The unique global identifier of the Bare Metal server. To see global identifier, log in to the IBM Cloud Classic Infrastructure API, that uses your API key as the password. If you specify this option, do not specify
hostname
,domain
, ormost_recent
at the same time. - hostname string
- The hostname of the Bare Metal server. If you specify the
hostname
, do not specifyglobal_identifier
at the same time. - id string
- (String) The unique identifier of the Bare Metal server.
- most
Recent boolean - For multiple Bare Metal services, you can set this argument to true to import only the most recently created server. If you specify this option, do not specify
global_identifier
at the same time.
- domain str
- The domain of the Bare Metal server. If you specify this option, do not specify
global_identifier
at the same time. - global_
identifier str - The unique global identifier of the Bare Metal server. To see global identifier, log in to the IBM Cloud Classic Infrastructure API, that uses your API key as the password. If you specify this option, do not specify
hostname
,domain
, ormost_recent
at the same time. - hostname str
- The hostname of the Bare Metal server. If you specify the
hostname
, do not specifyglobal_identifier
at the same time. - id str
- (String) The unique identifier of the Bare Metal server.
- most_
recent bool - For multiple Bare Metal services, you can set this argument to true to import only the most recently created server. If you specify this option, do not specify
global_identifier
at the same time.
- domain String
- The domain of the Bare Metal server. If you specify this option, do not specify
global_identifier
at the same time. - global
Identifier String - The unique global identifier of the Bare Metal server. To see global identifier, log in to the IBM Cloud Classic Infrastructure API, that uses your API key as the password. If you specify this option, do not specify
hostname
,domain
, ormost_recent
at the same time. - hostname String
- The hostname of the Bare Metal server. If you specify the
hostname
, do not specifyglobal_identifier
at the same time. - id String
- (String) The unique identifier of the Bare Metal server.
- most
Recent Boolean - For multiple Bare Metal services, you can set this argument to true to import only the most recently created server. If you specify this option, do not specify
global_identifier
at the same time.
getComputeBareMetal Result
The following output properties are available:
- Block
Storage List<double>Ids - (List of string) Block storage to which this computing server has access.
- Datacenter string
- (String) The data center in which the Bare Metal server is deployed.
- Domain string
- File
Storage List<double>Ids - (List of string) File storage to which this computing server has access.
- Global
Identifier string - Hostname string
- Hourly
Billing bool - (String) The billing type of the server.
- Id string
- (String) The unique identifier of the Bare Metal server.
- Ipv6Address string
- (String) The public IPv6 address of the Bare Metal server.
- Ipv6Address
Id double - (String) The unique identifier for the public IPv6 address of the Bare Metal server.
- Ipv6Enabled bool
- (Bool) Indicates whether the public IPv6 address is enabled or not.
- Memory double
- (Integer) The amount of memory in gigabytes, for the server.
- Network
Speed double - (String) The connection speed, expressed in Mbps, for the server network components.
- Notes string
- (String) Notes associated with the server.
- Os
Reference stringCode - (String) An operating system reference code that provisioned the computing server.
- Private
Ipv4Address string - (String) The private IPv4 address of the Bare Metal server.
- Private
Ipv4Address doubleId - (String) The unique identifier for the private IPv4 address of the Bare Metal server.
- Private
Network boolOnly - (String) Specifies whether the server has only access to the private network.
- Private
Subnet double - (String) The private subnet used for the private network interface of the server.
- Private
Vlan doubleId - (String) The private VLAN used for the private network interface of the server.
- Public
Bandwidth double - (String) The amount of public network traffic, allowed per month.
- Public
Ipv4Address string - (String) The public IPv4 address of the Bare Metal server.
- Public
Ipv4Address doubleId - (String) The unique identifier for the public IPv4 address of the Bare Metal server.
- Public
Subnet double - (String) The public subnet used for the public network interface of the server.
- Public
Vlan doubleId - (String) The public VLAN used for the public network interface of the server.
- Redundant
Network bool - (Bool) When the value is true, two physical network interfaces are provided with a bonding configuration.
- Redundant
Power boolSupply - (Bool) When the value is true, it indicates that more power supply is provided.
- Secondary
Ip List<string>Addresses - (String) The public secondary IPv4 addresses of the Bare Metal server.
- Secondary
Ip doubleCount - (Integer) The number of secondary IPv4 addresses of the Bare Metal server.
- List<string>
- (List of string) Tags associated with this Bare Metal server.
- Unbonded
Network bool - (Bool) When the value is true, two physical network interfaces are provided without a bonding configuration.
- User
Metadata string - (String) Arbitrary data available to the computing server.
- Most
Recent bool
- Block
Storage []float64Ids - (List of string) Block storage to which this computing server has access.
- Datacenter string
- (String) The data center in which the Bare Metal server is deployed.
- Domain string
- File
Storage []float64Ids - (List of string) File storage to which this computing server has access.
- Global
Identifier string - Hostname string
- Hourly
Billing bool - (String) The billing type of the server.
- Id string
- (String) The unique identifier of the Bare Metal server.
- Ipv6Address string
- (String) The public IPv6 address of the Bare Metal server.
- Ipv6Address
Id float64 - (String) The unique identifier for the public IPv6 address of the Bare Metal server.
- Ipv6Enabled bool
- (Bool) Indicates whether the public IPv6 address is enabled or not.
- Memory float64
- (Integer) The amount of memory in gigabytes, for the server.
- Network
Speed float64 - (String) The connection speed, expressed in Mbps, for the server network components.
- Notes string
- (String) Notes associated with the server.
- Os
Reference stringCode - (String) An operating system reference code that provisioned the computing server.
- Private
Ipv4Address string - (String) The private IPv4 address of the Bare Metal server.
- Private
Ipv4Address float64Id - (String) The unique identifier for the private IPv4 address of the Bare Metal server.
- Private
Network boolOnly - (String) Specifies whether the server has only access to the private network.
- Private
Subnet float64 - (String) The private subnet used for the private network interface of the server.
- Private
Vlan float64Id - (String) The private VLAN used for the private network interface of the server.
- Public
Bandwidth float64 - (String) The amount of public network traffic, allowed per month.
- Public
Ipv4Address string - (String) The public IPv4 address of the Bare Metal server.
- Public
Ipv4Address float64Id - (String) The unique identifier for the public IPv4 address of the Bare Metal server.
- Public
Subnet float64 - (String) The public subnet used for the public network interface of the server.
- Public
Vlan float64Id - (String) The public VLAN used for the public network interface of the server.
- Redundant
Network bool - (Bool) When the value is true, two physical network interfaces are provided with a bonding configuration.
- Redundant
Power boolSupply - (Bool) When the value is true, it indicates that more power supply is provided.
- Secondary
Ip []stringAddresses - (String) The public secondary IPv4 addresses of the Bare Metal server.
- Secondary
Ip float64Count - (Integer) The number of secondary IPv4 addresses of the Bare Metal server.
- []string
- (List of string) Tags associated with this Bare Metal server.
- Unbonded
Network bool - (Bool) When the value is true, two physical network interfaces are provided without a bonding configuration.
- User
Metadata string - (String) Arbitrary data available to the computing server.
- Most
Recent bool
- block
Storage List<Double>Ids - (List of string) Block storage to which this computing server has access.
- datacenter String
- (String) The data center in which the Bare Metal server is deployed.
- domain String
- file
Storage List<Double>Ids - (List of string) File storage to which this computing server has access.
- global
Identifier String - hostname String
- hourly
Billing Boolean - (String) The billing type of the server.
- id String
- (String) The unique identifier of the Bare Metal server.
- ipv6Address String
- (String) The public IPv6 address of the Bare Metal server.
- ipv6Address
Id Double - (String) The unique identifier for the public IPv6 address of the Bare Metal server.
- ipv6Enabled Boolean
- (Bool) Indicates whether the public IPv6 address is enabled or not.
- memory Double
- (Integer) The amount of memory in gigabytes, for the server.
- network
Speed Double - (String) The connection speed, expressed in Mbps, for the server network components.
- notes String
- (String) Notes associated with the server.
- os
Reference StringCode - (String) An operating system reference code that provisioned the computing server.
- private
Ipv4Address String - (String) The private IPv4 address of the Bare Metal server.
- private
Ipv4Address DoubleId - (String) The unique identifier for the private IPv4 address of the Bare Metal server.
- private
Network BooleanOnly - (String) Specifies whether the server has only access to the private network.
- private
Subnet Double - (String) The private subnet used for the private network interface of the server.
- private
Vlan DoubleId - (String) The private VLAN used for the private network interface of the server.
- public
Bandwidth Double - (String) The amount of public network traffic, allowed per month.
- public
Ipv4Address String - (String) The public IPv4 address of the Bare Metal server.
- public
Ipv4Address DoubleId - (String) The unique identifier for the public IPv4 address of the Bare Metal server.
- public
Subnet Double - (String) The public subnet used for the public network interface of the server.
- public
Vlan DoubleId - (String) The public VLAN used for the public network interface of the server.
- redundant
Network Boolean - (Bool) When the value is true, two physical network interfaces are provided with a bonding configuration.
- redundant
Power BooleanSupply - (Bool) When the value is true, it indicates that more power supply is provided.
- secondary
Ip List<String>Addresses - (String) The public secondary IPv4 addresses of the Bare Metal server.
- secondary
Ip DoubleCount - (Integer) The number of secondary IPv4 addresses of the Bare Metal server.
- List<String>
- (List of string) Tags associated with this Bare Metal server.
- unbonded
Network Boolean - (Bool) When the value is true, two physical network interfaces are provided without a bonding configuration.
- user
Metadata String - (String) Arbitrary data available to the computing server.
- most
Recent Boolean
- block
Storage number[]Ids - (List of string) Block storage to which this computing server has access.
- datacenter string
- (String) The data center in which the Bare Metal server is deployed.
- domain string
- file
Storage number[]Ids - (List of string) File storage to which this computing server has access.
- global
Identifier string - hostname string
- hourly
Billing boolean - (String) The billing type of the server.
- id string
- (String) The unique identifier of the Bare Metal server.
- ipv6Address string
- (String) The public IPv6 address of the Bare Metal server.
- ipv6Address
Id number - (String) The unique identifier for the public IPv6 address of the Bare Metal server.
- ipv6Enabled boolean
- (Bool) Indicates whether the public IPv6 address is enabled or not.
- memory number
- (Integer) The amount of memory in gigabytes, for the server.
- network
Speed number - (String) The connection speed, expressed in Mbps, for the server network components.
- notes string
- (String) Notes associated with the server.
- os
Reference stringCode - (String) An operating system reference code that provisioned the computing server.
- private
Ipv4Address string - (String) The private IPv4 address of the Bare Metal server.
- private
Ipv4Address numberId - (String) The unique identifier for the private IPv4 address of the Bare Metal server.
- private
Network booleanOnly - (String) Specifies whether the server has only access to the private network.
- private
Subnet number - (String) The private subnet used for the private network interface of the server.
- private
Vlan numberId - (String) The private VLAN used for the private network interface of the server.
- public
Bandwidth number - (String) The amount of public network traffic, allowed per month.
- public
Ipv4Address string - (String) The public IPv4 address of the Bare Metal server.
- public
Ipv4Address numberId - (String) The unique identifier for the public IPv4 address of the Bare Metal server.
- public
Subnet number - (String) The public subnet used for the public network interface of the server.
- public
Vlan numberId - (String) The public VLAN used for the public network interface of the server.
- redundant
Network boolean - (Bool) When the value is true, two physical network interfaces are provided with a bonding configuration.
- redundant
Power booleanSupply - (Bool) When the value is true, it indicates that more power supply is provided.
- secondary
Ip string[]Addresses - (String) The public secondary IPv4 addresses of the Bare Metal server.
- secondary
Ip numberCount - (Integer) The number of secondary IPv4 addresses of the Bare Metal server.
- string[]
- (List of string) Tags associated with this Bare Metal server.
- unbonded
Network boolean - (Bool) When the value is true, two physical network interfaces are provided without a bonding configuration.
- user
Metadata string - (String) Arbitrary data available to the computing server.
- most
Recent boolean
- block_
storage_ Sequence[float]ids - (List of string) Block storage to which this computing server has access.
- datacenter str
- (String) The data center in which the Bare Metal server is deployed.
- domain str
- file_
storage_ Sequence[float]ids - (List of string) File storage to which this computing server has access.
- global_
identifier str - hostname str
- hourly_
billing bool - (String) The billing type of the server.
- id str
- (String) The unique identifier of the Bare Metal server.
- ipv6_
address str - (String) The public IPv6 address of the Bare Metal server.
- ipv6_
address_ floatid - (String) The unique identifier for the public IPv6 address of the Bare Metal server.
- ipv6_
enabled bool - (Bool) Indicates whether the public IPv6 address is enabled or not.
- memory float
- (Integer) The amount of memory in gigabytes, for the server.
- network_
speed float - (String) The connection speed, expressed in Mbps, for the server network components.
- notes str
- (String) Notes associated with the server.
- os_
reference_ strcode - (String) An operating system reference code that provisioned the computing server.
- private_
ipv4_ straddress - (String) The private IPv4 address of the Bare Metal server.
- private_
ipv4_ floataddress_ id - (String) The unique identifier for the private IPv4 address of the Bare Metal server.
- private_
network_ boolonly - (String) Specifies whether the server has only access to the private network.
- private_
subnet float - (String) The private subnet used for the private network interface of the server.
- private_
vlan_ floatid - (String) The private VLAN used for the private network interface of the server.
- public_
bandwidth float - (String) The amount of public network traffic, allowed per month.
- public_
ipv4_ straddress - (String) The public IPv4 address of the Bare Metal server.
- public_
ipv4_ floataddress_ id - (String) The unique identifier for the public IPv4 address of the Bare Metal server.
- public_
subnet float - (String) The public subnet used for the public network interface of the server.
- public_
vlan_ floatid - (String) The public VLAN used for the public network interface of the server.
- redundant_
network bool - (Bool) When the value is true, two physical network interfaces are provided with a bonding configuration.
- redundant_
power_ boolsupply - (Bool) When the value is true, it indicates that more power supply is provided.
- secondary_
ip_ Sequence[str]addresses - (String) The public secondary IPv4 addresses of the Bare Metal server.
- secondary_
ip_ floatcount - (Integer) The number of secondary IPv4 addresses of the Bare Metal server.
- Sequence[str]
- (List of string) Tags associated with this Bare Metal server.
- unbonded_
network bool - (Bool) When the value is true, two physical network interfaces are provided without a bonding configuration.
- user_
metadata str - (String) Arbitrary data available to the computing server.
- most_
recent bool
- block
Storage List<Number>Ids - (List of string) Block storage to which this computing server has access.
- datacenter String
- (String) The data center in which the Bare Metal server is deployed.
- domain String
- file
Storage List<Number>Ids - (List of string) File storage to which this computing server has access.
- global
Identifier String - hostname String
- hourly
Billing Boolean - (String) The billing type of the server.
- id String
- (String) The unique identifier of the Bare Metal server.
- ipv6Address String
- (String) The public IPv6 address of the Bare Metal server.
- ipv6Address
Id Number - (String) The unique identifier for the public IPv6 address of the Bare Metal server.
- ipv6Enabled Boolean
- (Bool) Indicates whether the public IPv6 address is enabled or not.
- memory Number
- (Integer) The amount of memory in gigabytes, for the server.
- network
Speed Number - (String) The connection speed, expressed in Mbps, for the server network components.
- notes String
- (String) Notes associated with the server.
- os
Reference StringCode - (String) An operating system reference code that provisioned the computing server.
- private
Ipv4Address String - (String) The private IPv4 address of the Bare Metal server.
- private
Ipv4Address NumberId - (String) The unique identifier for the private IPv4 address of the Bare Metal server.
- private
Network BooleanOnly - (String) Specifies whether the server has only access to the private network.
- private
Subnet Number - (String) The private subnet used for the private network interface of the server.
- private
Vlan NumberId - (String) The private VLAN used for the private network interface of the server.
- public
Bandwidth Number - (String) The amount of public network traffic, allowed per month.
- public
Ipv4Address String - (String) The public IPv4 address of the Bare Metal server.
- public
Ipv4Address NumberId - (String) The unique identifier for the public IPv4 address of the Bare Metal server.
- public
Subnet Number - (String) The public subnet used for the public network interface of the server.
- public
Vlan NumberId - (String) The public VLAN used for the public network interface of the server.
- redundant
Network Boolean - (Bool) When the value is true, two physical network interfaces are provided with a bonding configuration.
- redundant
Power BooleanSupply - (Bool) When the value is true, it indicates that more power supply is provided.
- secondary
Ip List<String>Addresses - (String) The public secondary IPv4 addresses of the Bare Metal server.
- secondary
Ip NumberCount - (Integer) The number of secondary IPv4 addresses of the Bare Metal server.
- List<String>
- (List of string) Tags associated with this Bare Metal server.
- unbonded
Network Boolean - (Bool) When the value is true, two physical network interfaces are provided without a bonding configuration.
- user
Metadata String - (String) Arbitrary data available to the computing server.
- most
Recent Boolean
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibm
Terraform Provider.