1. Packages
  2. Ibm Provider
  3. API Docs
  4. getComputeBareMetal
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.getComputeBareMetal

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    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.
    GlobalIdentifier 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, or most_recent at the same time.
    Hostname string
    The hostname of the Bare Metal server. If you specify the hostname, do not specify global_identifier at the same time.
    Id string
    (String) The unique identifier of the Bare Metal server.
    MostRecent 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.
    GlobalIdentifier 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, or most_recent at the same time.
    Hostname string
    The hostname of the Bare Metal server. If you specify the hostname, do not specify global_identifier at the same time.
    Id string
    (String) The unique identifier of the Bare Metal server.
    MostRecent 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.
    globalIdentifier 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, or most_recent at the same time.
    hostname String
    The hostname of the Bare Metal server. If you specify the hostname, do not specify global_identifier at the same time.
    id String
    (String) The unique identifier of the Bare Metal server.
    mostRecent 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.
    globalIdentifier 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, or most_recent at the same time.
    hostname string
    The hostname of the Bare Metal server. If you specify the hostname, do not specify global_identifier at the same time.
    id string
    (String) The unique identifier of the Bare Metal server.
    mostRecent 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, or most_recent at the same time.
    hostname str
    The hostname of the Bare Metal server. If you specify the hostname, do not specify global_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.
    globalIdentifier 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, or most_recent at the same time.
    hostname String
    The hostname of the Bare Metal server. If you specify the hostname, do not specify global_identifier at the same time.
    id String
    (String) The unique identifier of the Bare Metal server.
    mostRecent 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:

    BlockStorageIds List<double>
    (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
    FileStorageIds List<double>
    (List of string) File storage to which this computing server has access.
    GlobalIdentifier string
    Hostname string
    HourlyBilling 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.
    Ipv6AddressId 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.
    NetworkSpeed double
    (String) The connection speed, expressed in Mbps, for the server network components.
    Notes string
    (String) Notes associated with the server.
    OsReferenceCode string
    (String) An operating system reference code that provisioned the computing server.
    PrivateIpv4Address string
    (String) The private IPv4 address of the Bare Metal server.
    PrivateIpv4AddressId double
    (String) The unique identifier for the private IPv4 address of the Bare Metal server.
    PrivateNetworkOnly bool
    (String) Specifies whether the server has only access to the private network.
    PrivateSubnet double
    (String) The private subnet used for the private network interface of the server.
    PrivateVlanId double
    (String) The private VLAN used for the private network interface of the server.
    PublicBandwidth double
    (String) The amount of public network traffic, allowed per month.
    PublicIpv4Address string
    (String) The public IPv4 address of the Bare Metal server.
    PublicIpv4AddressId double
    (String) The unique identifier for the public IPv4 address of the Bare Metal server.
    PublicSubnet double
    (String) The public subnet used for the public network interface of the server.
    PublicVlanId double
    (String) The public VLAN used for the public network interface of the server.
    RedundantNetwork bool
    (Bool) When the value is true, two physical network interfaces are provided with a bonding configuration.
    RedundantPowerSupply bool
    (Bool) When the value is true, it indicates that more power supply is provided.
    SecondaryIpAddresses List<string>
    (String) The public secondary IPv4 addresses of the Bare Metal server.
    SecondaryIpCount double
    (Integer) The number of secondary IPv4 addresses of the Bare Metal server.
    Tags List<string>
    (List of string) Tags associated with this Bare Metal server.
    UnbondedNetwork bool
    (Bool) When the value is true, two physical network interfaces are provided without a bonding configuration.
    UserMetadata string
    (String) Arbitrary data available to the computing server.
    MostRecent bool
    BlockStorageIds []float64
    (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
    FileStorageIds []float64
    (List of string) File storage to which this computing server has access.
    GlobalIdentifier string
    Hostname string
    HourlyBilling 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.
    Ipv6AddressId 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.
    NetworkSpeed float64
    (String) The connection speed, expressed in Mbps, for the server network components.
    Notes string
    (String) Notes associated with the server.
    OsReferenceCode string
    (String) An operating system reference code that provisioned the computing server.
    PrivateIpv4Address string
    (String) The private IPv4 address of the Bare Metal server.
    PrivateIpv4AddressId float64
    (String) The unique identifier for the private IPv4 address of the Bare Metal server.
    PrivateNetworkOnly bool
    (String) Specifies whether the server has only access to the private network.
    PrivateSubnet float64
    (String) The private subnet used for the private network interface of the server.
    PrivateVlanId float64
    (String) The private VLAN used for the private network interface of the server.
    PublicBandwidth float64
    (String) The amount of public network traffic, allowed per month.
    PublicIpv4Address string
    (String) The public IPv4 address of the Bare Metal server.
    PublicIpv4AddressId float64
    (String) The unique identifier for the public IPv4 address of the Bare Metal server.
    PublicSubnet float64
    (String) The public subnet used for the public network interface of the server.
    PublicVlanId float64
    (String) The public VLAN used for the public network interface of the server.
    RedundantNetwork bool
    (Bool) When the value is true, two physical network interfaces are provided with a bonding configuration.
    RedundantPowerSupply bool
    (Bool) When the value is true, it indicates that more power supply is provided.
    SecondaryIpAddresses []string
    (String) The public secondary IPv4 addresses of the Bare Metal server.
    SecondaryIpCount float64
    (Integer) The number of secondary IPv4 addresses of the Bare Metal server.
    Tags []string
    (List of string) Tags associated with this Bare Metal server.
    UnbondedNetwork bool
    (Bool) When the value is true, two physical network interfaces are provided without a bonding configuration.
    UserMetadata string
    (String) Arbitrary data available to the computing server.
    MostRecent bool
    blockStorageIds List<Double>
    (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
    fileStorageIds List<Double>
    (List of string) File storage to which this computing server has access.
    globalIdentifier String
    hostname String
    hourlyBilling 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.
    ipv6AddressId 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.
    networkSpeed Double
    (String) The connection speed, expressed in Mbps, for the server network components.
    notes String
    (String) Notes associated with the server.
    osReferenceCode String
    (String) An operating system reference code that provisioned the computing server.
    privateIpv4Address String
    (String) The private IPv4 address of the Bare Metal server.
    privateIpv4AddressId Double
    (String) The unique identifier for the private IPv4 address of the Bare Metal server.
    privateNetworkOnly Boolean
    (String) Specifies whether the server has only access to the private network.
    privateSubnet Double
    (String) The private subnet used for the private network interface of the server.
    privateVlanId Double
    (String) The private VLAN used for the private network interface of the server.
    publicBandwidth Double
    (String) The amount of public network traffic, allowed per month.
    publicIpv4Address String
    (String) The public IPv4 address of the Bare Metal server.
    publicIpv4AddressId Double
    (String) The unique identifier for the public IPv4 address of the Bare Metal server.
    publicSubnet Double
    (String) The public subnet used for the public network interface of the server.
    publicVlanId Double
    (String) The public VLAN used for the public network interface of the server.
    redundantNetwork Boolean
    (Bool) When the value is true, two physical network interfaces are provided with a bonding configuration.
    redundantPowerSupply Boolean
    (Bool) When the value is true, it indicates that more power supply is provided.
    secondaryIpAddresses List<String>
    (String) The public secondary IPv4 addresses of the Bare Metal server.
    secondaryIpCount Double
    (Integer) The number of secondary IPv4 addresses of the Bare Metal server.
    tags List<String>
    (List of string) Tags associated with this Bare Metal server.
    unbondedNetwork Boolean
    (Bool) When the value is true, two physical network interfaces are provided without a bonding configuration.
    userMetadata String
    (String) Arbitrary data available to the computing server.
    mostRecent Boolean
    blockStorageIds number[]
    (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
    fileStorageIds number[]
    (List of string) File storage to which this computing server has access.
    globalIdentifier string
    hostname string
    hourlyBilling 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.
    ipv6AddressId 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.
    networkSpeed number
    (String) The connection speed, expressed in Mbps, for the server network components.
    notes string
    (String) Notes associated with the server.
    osReferenceCode string
    (String) An operating system reference code that provisioned the computing server.
    privateIpv4Address string
    (String) The private IPv4 address of the Bare Metal server.
    privateIpv4AddressId number
    (String) The unique identifier for the private IPv4 address of the Bare Metal server.
    privateNetworkOnly boolean
    (String) Specifies whether the server has only access to the private network.
    privateSubnet number
    (String) The private subnet used for the private network interface of the server.
    privateVlanId number
    (String) The private VLAN used for the private network interface of the server.
    publicBandwidth number
    (String) The amount of public network traffic, allowed per month.
    publicIpv4Address string
    (String) The public IPv4 address of the Bare Metal server.
    publicIpv4AddressId number
    (String) The unique identifier for the public IPv4 address of the Bare Metal server.
    publicSubnet number
    (String) The public subnet used for the public network interface of the server.
    publicVlanId number
    (String) The public VLAN used for the public network interface of the server.
    redundantNetwork boolean
    (Bool) When the value is true, two physical network interfaces are provided with a bonding configuration.
    redundantPowerSupply boolean
    (Bool) When the value is true, it indicates that more power supply is provided.
    secondaryIpAddresses string[]
    (String) The public secondary IPv4 addresses of the Bare Metal server.
    secondaryIpCount number
    (Integer) The number of secondary IPv4 addresses of the Bare Metal server.
    tags string[]
    (List of string) Tags associated with this Bare Metal server.
    unbondedNetwork boolean
    (Bool) When the value is true, two physical network interfaces are provided without a bonding configuration.
    userMetadata string
    (String) Arbitrary data available to the computing server.
    mostRecent boolean
    block_storage_ids Sequence[float]
    (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_ids Sequence[float]
    (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_id float
    (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_code str
    (String) An operating system reference code that provisioned the computing server.
    private_ipv4_address str
    (String) The private IPv4 address of the Bare Metal server.
    private_ipv4_address_id float
    (String) The unique identifier for the private IPv4 address of the Bare Metal server.
    private_network_only bool
    (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_id float
    (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_address str
    (String) The public IPv4 address of the Bare Metal server.
    public_ipv4_address_id float
    (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_id float
    (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_supply bool
    (Bool) When the value is true, it indicates that more power supply is provided.
    secondary_ip_addresses Sequence[str]
    (String) The public secondary IPv4 addresses of the Bare Metal server.
    secondary_ip_count float
    (Integer) The number of secondary IPv4 addresses of the Bare Metal server.
    tags 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
    blockStorageIds List<Number>
    (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
    fileStorageIds List<Number>
    (List of string) File storage to which this computing server has access.
    globalIdentifier String
    hostname String
    hourlyBilling 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.
    ipv6AddressId 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.
    networkSpeed Number
    (String) The connection speed, expressed in Mbps, for the server network components.
    notes String
    (String) Notes associated with the server.
    osReferenceCode String
    (String) An operating system reference code that provisioned the computing server.
    privateIpv4Address String
    (String) The private IPv4 address of the Bare Metal server.
    privateIpv4AddressId Number
    (String) The unique identifier for the private IPv4 address of the Bare Metal server.
    privateNetworkOnly Boolean
    (String) Specifies whether the server has only access to the private network.
    privateSubnet Number
    (String) The private subnet used for the private network interface of the server.
    privateVlanId Number
    (String) The private VLAN used for the private network interface of the server.
    publicBandwidth Number
    (String) The amount of public network traffic, allowed per month.
    publicIpv4Address String
    (String) The public IPv4 address of the Bare Metal server.
    publicIpv4AddressId Number
    (String) The unique identifier for the public IPv4 address of the Bare Metal server.
    publicSubnet Number
    (String) The public subnet used for the public network interface of the server.
    publicVlanId Number
    (String) The public VLAN used for the public network interface of the server.
    redundantNetwork Boolean
    (Bool) When the value is true, two physical network interfaces are provided with a bonding configuration.
    redundantPowerSupply Boolean
    (Bool) When the value is true, it indicates that more power supply is provided.
    secondaryIpAddresses List<String>
    (String) The public secondary IPv4 addresses of the Bare Metal server.
    secondaryIpCount Number
    (Integer) The number of secondary IPv4 addresses of the Bare Metal server.
    tags List<String>
    (List of string) Tags associated with this Bare Metal server.
    unbondedNetwork Boolean
    (Bool) When the value is true, two physical network interfaces are provided without a bonding configuration.
    userMetadata String
    (String) Arbitrary data available to the computing server.
    mostRecent Boolean

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud