ibm.getIsBareMetalServerDisk
Explore with Pulumi AI
Import the details of an existing IBM Cloud Bare Metal Server Disk 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 dsBmsDisk = ibm.getIsBareMetalServerDisk({
bareMetalServer: ibm_is_bare_metal_server.example.id,
disk: ibm_is_bare_metal_server.example.disks[0].id,
});
import pulumi
import pulumi_ibm as ibm
ds_bms_disk = ibm.get_is_bare_metal_server_disk(bare_metal_server=ibm_is_bare_metal_server["example"]["id"],
disk=ibm_is_bare_metal_server["example"]["disks"][0]["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.LookupIsBareMetalServerDisk(ctx, &ibm.LookupIsBareMetalServerDiskArgs{
BareMetalServer: ibm_is_bare_metal_server.Example.Id,
Disk: ibm_is_bare_metal_server.Example.Disks[0].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 dsBmsDisk = Ibm.GetIsBareMetalServerDisk.Invoke(new()
{
BareMetalServer = ibm_is_bare_metal_server.Example.Id,
Disk = ibm_is_bare_metal_server.Example.Disks[0].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.GetIsBareMetalServerDiskArgs;
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 dsBmsDisk = IbmFunctions.getIsBareMetalServerDisk(GetIsBareMetalServerDiskArgs.builder()
.bareMetalServer(ibm_is_bare_metal_server.example().id())
.disk(ibm_is_bare_metal_server.example().disks()[0].id())
.build());
}
}
variables:
dsBmsDisk:
fn::invoke:
function: ibm:getIsBareMetalServerDisk
arguments:
bareMetalServer: ${ibm_is_bare_metal_server.example.id}
disk: ${ibm_is_bare_metal_server.example.disks[0].id}
Using getIsBareMetalServerDisk
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 getIsBareMetalServerDisk(args: GetIsBareMetalServerDiskArgs, opts?: InvokeOptions): Promise<GetIsBareMetalServerDiskResult>
function getIsBareMetalServerDiskOutput(args: GetIsBareMetalServerDiskOutputArgs, opts?: InvokeOptions): Output<GetIsBareMetalServerDiskResult>
def get_is_bare_metal_server_disk(bare_metal_server: Optional[str] = None,
disk: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetIsBareMetalServerDiskResult
def get_is_bare_metal_server_disk_output(bare_metal_server: Optional[pulumi.Input[str]] = None,
disk: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetIsBareMetalServerDiskResult]
func LookupIsBareMetalServerDisk(ctx *Context, args *LookupIsBareMetalServerDiskArgs, opts ...InvokeOption) (*LookupIsBareMetalServerDiskResult, error)
func LookupIsBareMetalServerDiskOutput(ctx *Context, args *LookupIsBareMetalServerDiskOutputArgs, opts ...InvokeOption) LookupIsBareMetalServerDiskResultOutput
> Note: This function is named LookupIsBareMetalServerDisk
in the Go SDK.
public static class GetIsBareMetalServerDisk
{
public static Task<GetIsBareMetalServerDiskResult> InvokeAsync(GetIsBareMetalServerDiskArgs args, InvokeOptions? opts = null)
public static Output<GetIsBareMetalServerDiskResult> Invoke(GetIsBareMetalServerDiskInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetIsBareMetalServerDiskResult> getIsBareMetalServerDisk(GetIsBareMetalServerDiskArgs args, InvokeOptions options)
public static Output<GetIsBareMetalServerDiskResult> getIsBareMetalServerDisk(GetIsBareMetalServerDiskArgs args, InvokeOptions options)
fn::invoke:
function: ibm:index/getIsBareMetalServerDisk:getIsBareMetalServerDisk
arguments:
# arguments dictionary
The following arguments are supported:
- Bare
Metal stringServer - The id for this bare metal server.
- Disk string
- The id for this bare metal server disk.
- Bare
Metal stringServer - The id for this bare metal server.
- Disk string
- The id for this bare metal server disk.
- bare
Metal StringServer - The id for this bare metal server.
- disk String
- The id for this bare metal server disk.
- bare
Metal stringServer - The id for this bare metal server.
- disk string
- The id for this bare metal server disk.
- bare_
metal_ strserver - The id for this bare metal server.
- disk str
- The id for this bare metal server disk.
- bare
Metal StringServer - The id for this bare metal server.
- disk String
- The id for this bare metal server disk.
getIsBareMetalServerDisk Result
The following output properties are available:
- Bare
Metal stringServer - Disk string
- Href string
- (String) The URL for this bare metal server disk.
- Id string
- (String) The unique identifier for this bare metal server disk.
- Interface
Type 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.
- Resource
Type string - (String) The resource type.
- Size double
- (String) The size of the disk in GB (gigabytes).
- Bare
Metal stringServer - Disk string
- Href string
- (String) The URL for this bare metal server disk.
- Id string
- (String) The unique identifier for this bare metal server disk.
- Interface
Type 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.
- Resource
Type string - (String) The resource type.
- Size float64
- (String) The size of the disk in GB (gigabytes).
- bare
Metal StringServer - disk String
- href String
- (String) The URL for this bare metal server disk.
- id String
- (String) The unique identifier for this bare metal server disk.
- interface
Type 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.
- resource
Type String - (String) The resource type.
- size Double
- (String) The size of the disk in GB (gigabytes).
- bare
Metal stringServer - disk string
- href string
- (String) The URL for this bare metal server disk.
- id string
- (String) The unique identifier for this bare metal server disk.
- interface
Type 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.
- resource
Type string - (String) The resource type.
- size number
- (String) The size of the disk in GB (gigabytes).
- bare_
metal_ strserver - disk str
- 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).
- bare
Metal StringServer - disk String
- href String
- (String) The URL for this bare metal server disk.
- id String
- (String) The unique identifier for this bare metal server disk.
- interface
Type 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.
- resource
Type 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.