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

ibm.IsBareMetalServerDisk

Explore with Pulumi AI

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

    Rename a Bare Metal Server for disk. For more information, about managing VPC Bare Metal Server, see About 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

    In the following example, you can update name of a Bare Metal Server disk:

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const disk = new ibm.IsBareMetalServerDisk("disk", {
        bareMetalServer: ibm_is_bare_metal_server.bms.id,
        disk: ibm_is_bare_metal_server.bms.disks[0].id,
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    disk = ibm.IsBareMetalServerDisk("disk",
        bare_metal_server=ibm_is_bare_metal_server["bms"]["id"],
        disk=ibm_is_bare_metal_server["bms"]["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.NewIsBareMetalServerDisk(ctx, "disk", &ibm.IsBareMetalServerDiskArgs{
    			BareMetalServer: pulumi.Any(ibm_is_bare_metal_server.Bms.Id),
    			Disk:            pulumi.Any(ibm_is_bare_metal_server.Bms.Disks[0].Id),
    		})
    		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 disk = new Ibm.IsBareMetalServerDisk("disk", new()
        {
            BareMetalServer = ibm_is_bare_metal_server.Bms.Id,
            Disk = ibm_is_bare_metal_server.Bms.Disks[0].Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.IsBareMetalServerDisk;
    import com.pulumi.ibm.IsBareMetalServerDiskArgs;
    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) {
            var disk = new IsBareMetalServerDisk("disk", IsBareMetalServerDiskArgs.builder()
                .bareMetalServer(ibm_is_bare_metal_server.bms().id())
                .disk(ibm_is_bare_metal_server.bms().disks()[0].id())
                .build());
    
        }
    }
    
    resources:
      disk:
        type: ibm:IsBareMetalServerDisk
        properties:
          bareMetalServer: ${ibm_is_bare_metal_server.bms.id}
          disk: ${ibm_is_bare_metal_server.bms.disks[0].id}
    

    Create IsBareMetalServerDisk Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new IsBareMetalServerDisk(name: string, args: IsBareMetalServerDiskArgs, opts?: CustomResourceOptions);
    @overload
    def IsBareMetalServerDisk(resource_name: str,
                              args: IsBareMetalServerDiskInitArgs,
                              opts: Optional[ResourceOptions] = None)
    
    @overload
    def IsBareMetalServerDisk(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              bare_metal_server: Optional[str] = None,
                              disk: Optional[str] = None,
                              is_bare_metal_server_disk_id: Optional[str] = None,
                              name: Optional[str] = None,
                              timeouts: Optional[IsBareMetalServerDiskTimeoutsArgs] = None)
    func NewIsBareMetalServerDisk(ctx *Context, name string, args IsBareMetalServerDiskArgs, opts ...ResourceOption) (*IsBareMetalServerDisk, error)
    public IsBareMetalServerDisk(string name, IsBareMetalServerDiskArgs args, CustomResourceOptions? opts = null)
    public IsBareMetalServerDisk(String name, IsBareMetalServerDiskArgs args)
    public IsBareMetalServerDisk(String name, IsBareMetalServerDiskArgs args, CustomResourceOptions options)
    
    type: ibm:IsBareMetalServerDisk
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args IsBareMetalServerDiskArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args IsBareMetalServerDiskInitArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args IsBareMetalServerDiskArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IsBareMetalServerDiskArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IsBareMetalServerDiskArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var isBareMetalServerDiskResource = new Ibm.IsBareMetalServerDisk("isBareMetalServerDiskResource", new()
    {
        BareMetalServer = "string",
        Disk = "string",
        IsBareMetalServerDiskId = "string",
        Name = "string",
        Timeouts = new Ibm.Inputs.IsBareMetalServerDiskTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
            Update = "string",
        },
    });
    
    example, err := ibm.NewIsBareMetalServerDisk(ctx, "isBareMetalServerDiskResource", &ibm.IsBareMetalServerDiskArgs{
    	BareMetalServer:         pulumi.String("string"),
    	Disk:                    pulumi.String("string"),
    	IsBareMetalServerDiskId: pulumi.String("string"),
    	Name:                    pulumi.String("string"),
    	Timeouts: &ibm.IsBareMetalServerDiskTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    		Update: pulumi.String("string"),
    	},
    })
    
    var isBareMetalServerDiskResource = new IsBareMetalServerDisk("isBareMetalServerDiskResource", IsBareMetalServerDiskArgs.builder()
        .bareMetalServer("string")
        .disk("string")
        .isBareMetalServerDiskId("string")
        .name("string")
        .timeouts(IsBareMetalServerDiskTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .update("string")
            .build())
        .build());
    
    is_bare_metal_server_disk_resource = ibm.IsBareMetalServerDisk("isBareMetalServerDiskResource",
        bare_metal_server="string",
        disk="string",
        is_bare_metal_server_disk_id="string",
        name="string",
        timeouts={
            "create": "string",
            "delete": "string",
            "update": "string",
        })
    
    const isBareMetalServerDiskResource = new ibm.IsBareMetalServerDisk("isBareMetalServerDiskResource", {
        bareMetalServer: "string",
        disk: "string",
        isBareMetalServerDiskId: "string",
        name: "string",
        timeouts: {
            create: "string",
            "delete": "string",
            update: "string",
        },
    });
    
    type: ibm:IsBareMetalServerDisk
    properties:
        bareMetalServer: string
        disk: string
        isBareMetalServerDiskId: string
        name: string
        timeouts:
            create: string
            delete: string
            update: string
    

    IsBareMetalServerDisk Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The IsBareMetalServerDisk resource accepts the following input properties:

    BareMetalServer string
    Bare metal server identifier.
    Disk string
    The unique identifier for the disk to be renamed on the Bare metal server.
    IsBareMetalServerDiskId string
    Name string
    The name for the disk.
    Timeouts IsBareMetalServerDiskTimeouts
    BareMetalServer string
    Bare metal server identifier.
    Disk string
    The unique identifier for the disk to be renamed on the Bare metal server.
    IsBareMetalServerDiskId string
    Name string
    The name for the disk.
    Timeouts IsBareMetalServerDiskTimeoutsArgs
    bareMetalServer String
    Bare metal server identifier.
    disk String
    The unique identifier for the disk to be renamed on the Bare metal server.
    isBareMetalServerDiskId String
    name String
    The name for the disk.
    timeouts IsBareMetalServerDiskTimeouts
    bareMetalServer string
    Bare metal server identifier.
    disk string
    The unique identifier for the disk to be renamed on the Bare metal server.
    isBareMetalServerDiskId string
    name string
    The name for the disk.
    timeouts IsBareMetalServerDiskTimeouts
    bare_metal_server str
    Bare metal server identifier.
    disk str
    The unique identifier for the disk to be renamed on the Bare metal server.
    is_bare_metal_server_disk_id str
    name str
    The name for the disk.
    timeouts IsBareMetalServerDiskTimeoutsArgs
    bareMetalServer String
    Bare metal server identifier.
    disk String
    The unique identifier for the disk to be renamed on the Bare metal server.
    isBareMetalServerDiskId String
    name String
    The name for the disk.
    timeouts Property Map

    Outputs

    All input properties are implicitly available as output properties. Additionally, the IsBareMetalServerDisk resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing IsBareMetalServerDisk Resource

    Get an existing IsBareMetalServerDisk resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: IsBareMetalServerDiskState, opts?: CustomResourceOptions): IsBareMetalServerDisk
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            bare_metal_server: Optional[str] = None,
            disk: Optional[str] = None,
            is_bare_metal_server_disk_id: Optional[str] = None,
            name: Optional[str] = None,
            timeouts: Optional[IsBareMetalServerDiskTimeoutsArgs] = None) -> IsBareMetalServerDisk
    func GetIsBareMetalServerDisk(ctx *Context, name string, id IDInput, state *IsBareMetalServerDiskState, opts ...ResourceOption) (*IsBareMetalServerDisk, error)
    public static IsBareMetalServerDisk Get(string name, Input<string> id, IsBareMetalServerDiskState? state, CustomResourceOptions? opts = null)
    public static IsBareMetalServerDisk get(String name, Output<String> id, IsBareMetalServerDiskState state, CustomResourceOptions options)
    resources:  _:    type: ibm:IsBareMetalServerDisk    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    BareMetalServer string
    Bare metal server identifier.
    Disk string
    The unique identifier for the disk to be renamed on the Bare metal server.
    IsBareMetalServerDiskId string
    Name string
    The name for the disk.
    Timeouts IsBareMetalServerDiskTimeouts
    BareMetalServer string
    Bare metal server identifier.
    Disk string
    The unique identifier for the disk to be renamed on the Bare metal server.
    IsBareMetalServerDiskId string
    Name string
    The name for the disk.
    Timeouts IsBareMetalServerDiskTimeoutsArgs
    bareMetalServer String
    Bare metal server identifier.
    disk String
    The unique identifier for the disk to be renamed on the Bare metal server.
    isBareMetalServerDiskId String
    name String
    The name for the disk.
    timeouts IsBareMetalServerDiskTimeouts
    bareMetalServer string
    Bare metal server identifier.
    disk string
    The unique identifier for the disk to be renamed on the Bare metal server.
    isBareMetalServerDiskId string
    name string
    The name for the disk.
    timeouts IsBareMetalServerDiskTimeouts
    bare_metal_server str
    Bare metal server identifier.
    disk str
    The unique identifier for the disk to be renamed on the Bare metal server.
    is_bare_metal_server_disk_id str
    name str
    The name for the disk.
    timeouts IsBareMetalServerDiskTimeoutsArgs
    bareMetalServer String
    Bare metal server identifier.
    disk String
    The unique identifier for the disk to be renamed on the Bare metal server.
    isBareMetalServerDiskId String
    name String
    The name for the disk.
    timeouts Property Map

    Supporting Types

    IsBareMetalServerDiskTimeouts, IsBareMetalServerDiskTimeoutsArgs

    Create string
    Delete string
    Update string
    Create string
    Delete string
    Update string
    create String
    delete String
    update String
    create string
    delete string
    update string
    create str
    delete str
    update str
    create String
    delete String
    update String

    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