ibm.IsBareMetalServerDisk
Explore with Pulumi AI
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:
- Bare
Metal stringServer - Bare metal server identifier.
- Disk string
- The unique identifier for the disk to be renamed on the Bare metal server.
- Is
Bare stringMetal Server Disk Id - (String) The unique identifier for this bare metal server disk.
- Name string
- The name for the disk.
- Timeouts
Is
Bare Metal Server Disk Timeouts
- Bare
Metal stringServer - Bare metal server identifier.
- Disk string
- The unique identifier for the disk to be renamed on the Bare metal server.
- Is
Bare stringMetal Server Disk Id - (String) The unique identifier for this bare metal server disk.
- Name string
- The name for the disk.
- Timeouts
Is
Bare Metal Server Disk Timeouts Args
- bare
Metal StringServer - Bare metal server identifier.
- disk String
- The unique identifier for the disk to be renamed on the Bare metal server.
- is
Bare StringMetal Server Disk Id - (String) The unique identifier for this bare metal server disk.
- name String
- The name for the disk.
- timeouts
Is
Bare Metal Server Disk Timeouts
- bare
Metal stringServer - Bare metal server identifier.
- disk string
- The unique identifier for the disk to be renamed on the Bare metal server.
- is
Bare stringMetal Server Disk Id - (String) The unique identifier for this bare metal server disk.
- name string
- The name for the disk.
- timeouts
Is
Bare Metal Server Disk Timeouts
- bare_
metal_ strserver - Bare metal server identifier.
- disk str
- The unique identifier for the disk to be renamed on the Bare metal server.
- is_
bare_ strmetal_ server_ disk_ id - (String) The unique identifier for this bare metal server disk.
- name str
- The name for the disk.
- timeouts
Is
Bare Metal Server Disk Timeouts Args
- bare
Metal StringServer - Bare metal server identifier.
- disk String
- The unique identifier for the disk to be renamed on the Bare metal server.
- is
Bare StringMetal Server Disk Id - (String) The unique identifier for this bare metal server disk.
- 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:
- Allowed
Uses List<IsBare Metal Server Disk Allowed Use> - (List) The usage constraints to be matched against the requested bare metal server properties to determine compatibility.
- Created
At string - The date and time that the disk was created.
- Href string
- (String) The URL for this bare metal server disk.
- Id string
- The provider-assigned unique ID for this managed resource.
- Interface
Type string - (String) The disk interface used for attaching the disk. Supported values are [ nvme, sata ].
- Resource
Type string - (String) The resource type.
- Size double
- (String) The size of the disk in GB (gigabytes).
- Allowed
Uses []IsBare Metal Server Disk Allowed Use - (List) The usage constraints to be matched against the requested bare metal server properties to determine compatibility.
- Created
At string - The date and time that the disk was created.
- Href string
- (String) The URL for this bare metal server disk.
- Id string
- The provider-assigned unique ID for this managed resource.
- Interface
Type string - (String) The disk interface used for attaching the disk. Supported values are [ nvme, sata ].
- Resource
Type string - (String) The resource type.
- Size float64
- (String) The size of the disk in GB (gigabytes).
- allowed
Uses List<IsBare Metal Server Disk Allowed Use> - (List) The usage constraints to be matched against the requested bare metal server properties to determine compatibility.
- created
At String - The date and time that the disk was created.
- href String
- (String) The URL for this bare metal server disk.
- id String
- The provider-assigned unique ID for this managed resource.
- interface
Type String - (String) The disk interface used for attaching the disk. Supported values are [ nvme, sata ].
- resource
Type String - (String) The resource type.
- size Double
- (String) The size of the disk in GB (gigabytes).
- allowed
Uses IsBare Metal Server Disk Allowed Use[] - (List) The usage constraints to be matched against the requested bare metal server properties to determine compatibility.
- created
At string - The date and time that the disk was created.
- href string
- (String) The URL for this bare metal server disk.
- id string
- The provider-assigned unique ID for this managed resource.
- interface
Type string - (String) The disk interface used for attaching the disk. Supported values are [ nvme, sata ].
- resource
Type string - (String) The resource type.
- size number
- (String) The size of the disk in GB (gigabytes).
- allowed_
uses Sequence[IsBare Metal Server Disk Allowed Use] - (List) The usage constraints to be matched against the requested bare metal server properties to determine compatibility.
- created_
at str - The date and time that the disk was created.
- href str
- (String) The URL for this bare metal server disk.
- id str
- The provider-assigned unique ID for this managed resource.
- interface_
type str - (String) The disk interface used for attaching the disk. Supported values are [ nvme, sata ].
- resource_
type str - (String) The resource type.
- size float
- (String) The size of the disk in GB (gigabytes).
- allowed
Uses List<Property Map> - (List) The usage constraints to be matched against the requested bare metal server properties to determine compatibility.
- created
At String - The date and time that the disk was created.
- href String
- (String) The URL for this bare metal server disk.
- id String
- The provider-assigned unique ID for this managed resource.
- interface
Type String - (String) The disk interface used for attaching the disk. Supported values are [ nvme, sata ].
- resource
Type String - (String) The resource type.
- size Number
- (String) The size of the disk in GB (gigabytes).
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,
allowed_uses: Optional[Sequence[IsBareMetalServerDiskAllowedUseArgs]] = None,
bare_metal_server: Optional[str] = None,
created_at: Optional[str] = None,
disk: Optional[str] = None,
href: Optional[str] = None,
interface_type: Optional[str] = None,
is_bare_metal_server_disk_id: Optional[str] = None,
name: Optional[str] = None,
resource_type: Optional[str] = None,
size: Optional[float] = 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.
- Allowed
Uses List<IsBare Metal Server Disk Allowed Use> - (List) The usage constraints to be matched against the requested bare metal server properties to determine compatibility.
- Bare
Metal stringServer - Bare metal server identifier.
- Created
At string - The date and time that the disk was created.
- Disk string
- The unique identifier for the disk to be renamed on the Bare metal server.
- Href string
- (String) The URL for this bare metal server disk.
- Interface
Type string - (String) The disk interface used for attaching the disk. Supported values are [ nvme, sata ].
- Is
Bare stringMetal Server Disk Id - (String) The unique identifier for this bare metal server disk.
- Name string
- The name for the disk.
- Resource
Type string - (String) The resource type.
- Size double
- (String) The size of the disk in GB (gigabytes).
- Timeouts
Is
Bare Metal Server Disk Timeouts
- Allowed
Uses []IsBare Metal Server Disk Allowed Use Args - (List) The usage constraints to be matched against the requested bare metal server properties to determine compatibility.
- Bare
Metal stringServer - Bare metal server identifier.
- Created
At string - The date and time that the disk was created.
- Disk string
- The unique identifier for the disk to be renamed on the Bare metal server.
- Href string
- (String) The URL for this bare metal server disk.
- Interface
Type string - (String) The disk interface used for attaching the disk. Supported values are [ nvme, sata ].
- Is
Bare stringMetal Server Disk Id - (String) The unique identifier for this bare metal server disk.
- Name string
- The name for the disk.
- Resource
Type string - (String) The resource type.
- Size float64
- (String) The size of the disk in GB (gigabytes).
- Timeouts
Is
Bare Metal Server Disk Timeouts Args
- allowed
Uses List<IsBare Metal Server Disk Allowed Use> - (List) The usage constraints to be matched against the requested bare metal server properties to determine compatibility.
- bare
Metal StringServer - Bare metal server identifier.
- created
At String - The date and time that the disk was created.
- disk String
- The unique identifier for the disk to be renamed on the Bare metal server.
- href String
- (String) The URL for this bare metal server disk.
- interface
Type String - (String) The disk interface used for attaching the disk. Supported values are [ nvme, sata ].
- is
Bare StringMetal Server Disk Id - (String) The unique identifier for this bare metal server disk.
- name String
- The name for the disk.
- resource
Type String - (String) The resource type.
- size Double
- (String) The size of the disk in GB (gigabytes).
- timeouts
Is
Bare Metal Server Disk Timeouts
- allowed
Uses IsBare Metal Server Disk Allowed Use[] - (List) The usage constraints to be matched against the requested bare metal server properties to determine compatibility.
- bare
Metal stringServer - Bare metal server identifier.
- created
At string - The date and time that the disk was created.
- disk string
- The unique identifier for the disk to be renamed on the Bare metal server.
- href string
- (String) The URL for this bare metal server disk.
- interface
Type string - (String) The disk interface used for attaching the disk. Supported values are [ nvme, sata ].
- is
Bare stringMetal Server Disk Id - (String) The unique identifier for this bare metal server disk.
- name string
- The name for the disk.
- resource
Type string - (String) The resource type.
- size number
- (String) The size of the disk in GB (gigabytes).
- timeouts
Is
Bare Metal Server Disk Timeouts
- allowed_
uses Sequence[IsBare Metal Server Disk Allowed Use Args] - (List) The usage constraints to be matched against the requested bare metal server properties to determine compatibility.
- bare_
metal_ strserver - Bare metal server identifier.
- created_
at str - The date and time that the disk was created.
- disk str
- The unique identifier for the disk to be renamed on the Bare metal server.
- href str
- (String) The URL for this bare metal server disk.
- interface_
type str - (String) The disk interface used for attaching the disk. Supported values are [ nvme, sata ].
- is_
bare_ strmetal_ server_ disk_ id - (String) The unique identifier for this bare metal server disk.
- name str
- The name for the disk.
- resource_
type str - (String) The resource type.
- size float
- (String) The size of the disk in GB (gigabytes).
- timeouts
Is
Bare Metal Server Disk Timeouts Args
- allowed
Uses List<Property Map> - (List) The usage constraints to be matched against the requested bare metal server properties to determine compatibility.
- bare
Metal StringServer - Bare metal server identifier.
- created
At String - The date and time that the disk was created.
- disk String
- The unique identifier for the disk to be renamed on the Bare metal server.
- href String
- (String) The URL for this bare metal server disk.
- interface
Type String - (String) The disk interface used for attaching the disk. Supported values are [ nvme, sata ].
- is
Bare StringMetal Server Disk Id - (String) The unique identifier for this bare metal server disk.
- name String
- The name for the disk.
- resource
Type String - (String) The resource type.
- size Number
- (String) The size of the disk in GB (gigabytes).
- timeouts Property Map
Supporting Types
IsBareMetalServerDiskAllowedUse, IsBareMetalServerDiskAllowedUseArgs
- Api
Version string - (String) The API version with which to evaluate the expressions. If specified, the value must be between 2019-01-01 and today's date (in UTC). If unspecified, the version query parameter value will be used.
- Bare
Metal stringServer - Bare metal server identifier.
- Api
Version string - (String) The API version with which to evaluate the expressions. If specified, the value must be between 2019-01-01 and today's date (in UTC). If unspecified, the version query parameter value will be used.
- Bare
Metal stringServer - Bare metal server identifier.
- api
Version String - (String) The API version with which to evaluate the expressions. If specified, the value must be between 2019-01-01 and today's date (in UTC). If unspecified, the version query parameter value will be used.
- bare
Metal StringServer - Bare metal server identifier.
- api
Version string - (String) The API version with which to evaluate the expressions. If specified, the value must be between 2019-01-01 and today's date (in UTC). If unspecified, the version query parameter value will be used.
- bare
Metal stringServer - Bare metal server identifier.
- api_
version str - (String) The API version with which to evaluate the expressions. If specified, the value must be between 2019-01-01 and today's date (in UTC). If unspecified, the version query parameter value will be used.
- bare_
metal_ strserver - Bare metal server identifier.
- api
Version String - (String) The API version with which to evaluate the expressions. If specified, the value must be between 2019-01-01 and today's date (in UTC). If unspecified, the version query parameter value will be used.
- bare
Metal StringServer - Bare metal server identifier.
IsBareMetalServerDiskTimeouts, IsBareMetalServerDiskTimeoutsArgs
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibm
Terraform Provider.