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

ibm.getIsBareMetalServerDisks

Explore with Pulumi AI

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

    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";
    
    import pulumi
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    
    return await Deployment.RunAsync(() => 
    {
    });
    
    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) {
        }
    }
    
    {}
    

    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,
    });
    
    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"])
    
    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
    	})
    }
    
    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,
        });
    
    });
    
    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());
    
        }
    }
    
    variables:
      dsBmserverDisks:
        fn::invoke:
          function: ibm:getIsBareMetalServerDisks
          arguments:
            bareMetalServer: ${ibm_is_bare_metal_server.example.id}
    

    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>
    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]
    func GetIsBareMetalServerDisks(ctx *Context, args *GetIsBareMetalServerDisksArgs, opts ...InvokeOption) (*GetIsBareMetalServerDisksResult, error)
    func GetIsBareMetalServerDisksOutput(ctx *Context, args *GetIsBareMetalServerDisksOutputArgs, opts ...InvokeOption) GetIsBareMetalServerDisksResultOutput

    > 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)
    }
    public static CompletableFuture<GetIsBareMetalServerDisksResult> getIsBareMetalServerDisks(GetIsBareMetalServerDisksArgs args, InvokeOptions options)
    public static Output<GetIsBareMetalServerDisksResult> getIsBareMetalServerDisks(GetIsBareMetalServerDisksArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getIsBareMetalServerDisks:getIsBareMetalServerDisks
      arguments:
        # arguments dictionary

    The following arguments are supported:

    BareMetalServer string
    The id for this bare metal server.
    Id string
    (String) The unique identifier for this bare metal server disk.
    BareMetalServer string
    The id for this bare metal server.
    Id string
    (String) The unique identifier for this bare metal server disk.
    bareMetalServer String
    The id for this bare metal server.
    id String
    (String) The unique identifier for this bare metal server disk.
    bareMetalServer string
    The id for this bare metal server.
    id string
    (String) The unique identifier for this bare metal server disk.
    bare_metal_server str
    The id for this bare metal server.
    id str
    (String) The unique identifier for this bare metal server disk.
    bareMetalServer 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 string
    (String) The URL for this bare metal server disk.
    Id string
    (String) The unique identifier for this bare metal server disk.
    InterfaceType string
    (String) The disk interface used for attaching the disk. Supported values are [ nvme, sata ].
    Name string
    (String) The user-defined name for this disk.
    ResourceType string
    (String) The resource type.
    Size double
    (String) The size of the disk in GB (gigabytes).
    Href string
    (String) The URL for this bare metal server disk.
    Id string
    (String) The unique identifier for this bare metal server disk.
    InterfaceType string
    (String) The disk interface used for attaching the disk. Supported values are [ nvme, sata ].
    Name string
    (String) The user-defined name for this disk.
    ResourceType string
    (String) The resource type.
    Size float64
    (String) The size of the disk in GB (gigabytes).
    href String
    (String) The URL for this bare metal server disk.
    id String
    (String) The unique identifier for this bare metal server disk.
    interfaceType String
    (String) The disk interface used for attaching the disk. Supported values are [ nvme, sata ].
    name String
    (String) The user-defined name for this disk.
    resourceType String
    (String) The resource type.
    size Double
    (String) The size of the disk in GB (gigabytes).
    href string
    (String) The URL for this bare metal server disk.
    id string
    (String) The unique identifier for this bare metal server disk.
    interfaceType string
    (String) The disk interface used for attaching the disk. Supported values are [ nvme, sata ].
    name string
    (String) The user-defined name for this disk.
    resourceType string
    (String) The resource type.
    size number
    (String) The size of the disk in GB (gigabytes).
    href str
    (String) The URL for this bare metal server disk.
    id str
    (String) The unique identifier for this bare metal server disk.
    interface_type str
    (String) The disk interface used for attaching the disk. Supported values are [ nvme, sata ].
    name str
    (String) The user-defined name for this disk.
    resource_type str
    (String) The resource type.
    size float
    (String) The size of the disk in GB (gigabytes).
    href String
    (String) The URL for this bare metal server disk.
    id String
    (String) The unique identifier for this bare metal server disk.
    interfaceType String
    (String) The disk interface used for attaching the disk. Supported values are [ nvme, sata ].
    name String
    (String) The user-defined name for this disk.
    resourceType String
    (String) The resource type.
    size 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.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud