1. Packages
  2. Ibm Provider
  3. API Docs
  4. getIsBareMetalServerDisks
ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud

ibm.getIsBareMetalServerDisks

Explore with Pulumi AI

Import the details of an existing IBM Cloud vBare Metal Server Disk collection as a read-only data source. You can then reference the fields of the data source in other resources within the same configuration using interpolation syntax. For more information, about bare metal server disks, see Storage of Bare Metal Servers for VPC.

Note: VPC infrastructure services are a regional specific based endpoint, by default targets to us-south. Please make sure to target right region in the provider block as shown in the provider.tf file, if VPC service is created in region other than us-south.

provider.tf

import * as pulumi from "@pulumi/pulumi";
Copy
import pulumi
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;

return await Deployment.RunAsync(() => 
{
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
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) {
    }
}
Copy
{}
Copy

Example Usage

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

const dsBmserverDisks = ibm.getIsBareMetalServerDisks({
    bareMetalServer: ibm_is_bare_metal_server.example.id,
});
Copy
import pulumi
import pulumi_ibm as ibm

ds_bmserver_disks = ibm.get_is_bare_metal_server_disks(bare_metal_server=ibm_is_bare_metal_server["example"]["id"])
Copy
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.GetIsBareMetalServerDisks(ctx, &ibm.GetIsBareMetalServerDisksArgs{
			BareMetalServer: ibm_is_bare_metal_server.Example.Id,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;

return await Deployment.RunAsync(() => 
{
    var dsBmserverDisks = Ibm.GetIsBareMetalServerDisks.Invoke(new()
    {
        BareMetalServer = ibm_is_bare_metal_server.Example.Id,
    });

});
Copy
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.GetIsBareMetalServerDisksArgs;
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 dsBmserverDisks = IbmFunctions.getIsBareMetalServerDisks(GetIsBareMetalServerDisksArgs.builder()
            .bareMetalServer(ibm_is_bare_metal_server.example().id())
            .build());

    }
}
Copy
variables:
  dsBmserverDisks:
    fn::invoke:
      function: ibm:getIsBareMetalServerDisks
      arguments:
        bareMetalServer: ${ibm_is_bare_metal_server.example.id}
Copy

Using getIsBareMetalServerDisks

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 getIsBareMetalServerDisks(args: GetIsBareMetalServerDisksArgs, opts?: InvokeOptions): Promise<GetIsBareMetalServerDisksResult>
function getIsBareMetalServerDisksOutput(args: GetIsBareMetalServerDisksOutputArgs, opts?: InvokeOptions): Output<GetIsBareMetalServerDisksResult>
Copy
def get_is_bare_metal_server_disks(bare_metal_server: Optional[str] = None,
                                   id: Optional[str] = None,
                                   opts: Optional[InvokeOptions] = None) -> GetIsBareMetalServerDisksResult
def get_is_bare_metal_server_disks_output(bare_metal_server: Optional[pulumi.Input[str]] = None,
                                   id: Optional[pulumi.Input[str]] = None,
                                   opts: Optional[InvokeOptions] = None) -> Output[GetIsBareMetalServerDisksResult]
Copy
func GetIsBareMetalServerDisks(ctx *Context, args *GetIsBareMetalServerDisksArgs, opts ...InvokeOption) (*GetIsBareMetalServerDisksResult, error)
func GetIsBareMetalServerDisksOutput(ctx *Context, args *GetIsBareMetalServerDisksOutputArgs, opts ...InvokeOption) GetIsBareMetalServerDisksResultOutput
Copy

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

public static class GetIsBareMetalServerDisks 
{
    public static Task<GetIsBareMetalServerDisksResult> InvokeAsync(GetIsBareMetalServerDisksArgs args, InvokeOptions? opts = null)
    public static Output<GetIsBareMetalServerDisksResult> Invoke(GetIsBareMetalServerDisksInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetIsBareMetalServerDisksResult> getIsBareMetalServerDisks(GetIsBareMetalServerDisksArgs args, InvokeOptions options)
public static Output<GetIsBareMetalServerDisksResult> getIsBareMetalServerDisks(GetIsBareMetalServerDisksArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: ibm:index/getIsBareMetalServerDisks:getIsBareMetalServerDisks
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

BareMetalServer This property is required. string
The id for this bare metal server.
Id string
(String) The unique identifier for this bare metal server disk.
BareMetalServer This property is required. string
The id for this bare metal server.
Id string
(String) The unique identifier for this bare metal server disk.
bareMetalServer This property is required. String
The id for this bare metal server.
id String
(String) The unique identifier for this bare metal server disk.
bareMetalServer This property is required. string
The id for this bare metal server.
id string
(String) The unique identifier for this bare metal server disk.
bare_metal_server This property is required. str
The id for this bare metal server.
id str
(String) The unique identifier for this bare metal server disk.
bareMetalServer This property is required. String
The id for this bare metal server.
id String
(String) The unique identifier for this bare metal server disk.

getIsBareMetalServerDisks Result

The following output properties are available:

BareMetalServer string
Disks List<GetIsBareMetalServerDisksDisk>
(List of objects) A list of bare metal server disks. Disk is a block device that is locally attached to the physical server. By default, the listed disks are sorted by their created_at property values, with the newest disk first.
Id string
(String) The unique identifier for this bare metal server disk.
BareMetalServer string
Disks []GetIsBareMetalServerDisksDisk
(List of objects) A list of bare metal server disks. Disk is a block device that is locally attached to the physical server. By default, the listed disks are sorted by their created_at property values, with the newest disk first.
Id string
(String) The unique identifier for this bare metal server disk.
bareMetalServer String
disks List<GetIsBareMetalServerDisksDisk>
(List of objects) A list of bare metal server disks. Disk is a block device that is locally attached to the physical server. By default, the listed disks are sorted by their created_at property values, with the newest disk first.
id String
(String) The unique identifier for this bare metal server disk.
bareMetalServer string
disks GetIsBareMetalServerDisksDisk[]
(List of objects) A list of bare metal server disks. Disk is a block device that is locally attached to the physical server. By default, the listed disks are sorted by their created_at property values, with the newest disk first.
id string
(String) The unique identifier for this bare metal server disk.
bare_metal_server str
disks Sequence[GetIsBareMetalServerDisksDisk]
(List of objects) A list of bare metal server disks. Disk is a block device that is locally attached to the physical server. By default, the listed disks are sorted by their created_at property values, with the newest disk first.
id str
(String) The unique identifier for this bare metal server disk.
bareMetalServer String
disks List<Property Map>
(List of objects) A list of bare metal server disks. Disk is a block device that is locally attached to the physical server. By default, the listed disks are sorted by their created_at property values, with the newest disk first.
id String
(String) The unique identifier for this bare metal server disk.

Supporting Types

GetIsBareMetalServerDisksDisk

Href This property is required. string
(String) The URL for this bare metal server disk.
Id This property is required. string
(String) The unique identifier for this bare metal server disk.
InterfaceType This property is required. string
(String) The disk interface used for attaching the disk. Supported values are [ nvme, sata ].
Name This property is required. string
(String) The user-defined name for this disk.
ResourceType This property is required. string
(String) The resource type.
Size This property is required. double
(String) The size of the disk in GB (gigabytes).
Href This property is required. string
(String) The URL for this bare metal server disk.
Id This property is required. string
(String) The unique identifier for this bare metal server disk.
InterfaceType This property is required. string
(String) The disk interface used for attaching the disk. Supported values are [ nvme, sata ].
Name This property is required. string
(String) The user-defined name for this disk.
ResourceType This property is required. string
(String) The resource type.
Size This property is required. float64
(String) The size of the disk in GB (gigabytes).
href This property is required. String
(String) The URL for this bare metal server disk.
id This property is required. String
(String) The unique identifier for this bare metal server disk.
interfaceType This property is required. String
(String) The disk interface used for attaching the disk. Supported values are [ nvme, sata ].
name This property is required. String
(String) The user-defined name for this disk.
resourceType This property is required. String
(String) The resource type.
size This property is required. Double
(String) The size of the disk in GB (gigabytes).
href This property is required. string
(String) The URL for this bare metal server disk.
id This property is required. string
(String) The unique identifier for this bare metal server disk.
interfaceType This property is required. string
(String) The disk interface used for attaching the disk. Supported values are [ nvme, sata ].
name This property is required. string
(String) The user-defined name for this disk.
resourceType This property is required. string
(String) The resource type.
size This property is required. number
(String) The size of the disk in GB (gigabytes).
href This property is required. str
(String) The URL for this bare metal server disk.
id This property is required. str
(String) The unique identifier for this bare metal server disk.
interface_type This property is required. str
(String) The disk interface used for attaching the disk. Supported values are [ nvme, sata ].
name This property is required. str
(String) The user-defined name for this disk.
resource_type This property is required. str
(String) The resource type.
size This property is required. float
(String) The size of the disk in GB (gigabytes).
href This property is required. String
(String) The URL for this bare metal server disk.
id This property is required. String
(String) The unique identifier for this bare metal server disk.
interfaceType This property is required. String
(String) The disk interface used for attaching the disk. Supported values are [ nvme, sata ].
name This property is required. String
(String) The user-defined name for this disk.
resourceType This property is required. String
(String) The resource type.
size This property is required. Number
(String) The size of the disk in GB (gigabytes).

Package Details

Repository
ibm ibm-cloud/terraform-provider-ibm
License
Notes
This Pulumi package is based on the ibm Terraform Provider.