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

ibm.ContainerStorageAttachment

Explore with Pulumi AI

Create, update, or delete a VPC storage attachment of a VPC worker node. For more information, about VPC storage attachment, see Attaching a block storage volume.

Create ContainerStorageAttachment Resource

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

Constructor syntax

new ContainerStorageAttachment(name: string, args: ContainerStorageAttachmentArgs, opts?: CustomResourceOptions);
@overload
def ContainerStorageAttachment(resource_name: str,
                               args: ContainerStorageAttachmentArgs,
                               opts: Optional[ResourceOptions] = None)

@overload
def ContainerStorageAttachment(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               cluster: Optional[str] = None,
                               volume: Optional[str] = None,
                               worker: Optional[str] = None,
                               container_storage_attachment_id: Optional[str] = None,
                               resource_group_id: Optional[str] = None,
                               timeouts: Optional[ContainerStorageAttachmentTimeoutsArgs] = None)
func NewContainerStorageAttachment(ctx *Context, name string, args ContainerStorageAttachmentArgs, opts ...ResourceOption) (*ContainerStorageAttachment, error)
public ContainerStorageAttachment(string name, ContainerStorageAttachmentArgs args, CustomResourceOptions? opts = null)
public ContainerStorageAttachment(String name, ContainerStorageAttachmentArgs args)
public ContainerStorageAttachment(String name, ContainerStorageAttachmentArgs args, CustomResourceOptions options)
type: ibm:ContainerStorageAttachment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ContainerStorageAttachmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ContainerStorageAttachmentArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ContainerStorageAttachmentArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ContainerStorageAttachmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ContainerStorageAttachmentArgs
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 containerStorageAttachmentResource = new Ibm.ContainerStorageAttachment("containerStorageAttachmentResource", new()
{
    Cluster = "string",
    Volume = "string",
    Worker = "string",
    ContainerStorageAttachmentId = "string",
    ResourceGroupId = "string",
    Timeouts = new Ibm.Inputs.ContainerStorageAttachmentTimeoutsArgs
    {
        Create = "string",
        Delete = "string",
    },
});
Copy
example, err := ibm.NewContainerStorageAttachment(ctx, "containerStorageAttachmentResource", &ibm.ContainerStorageAttachmentArgs{
	Cluster:                      pulumi.String("string"),
	Volume:                       pulumi.String("string"),
	Worker:                       pulumi.String("string"),
	ContainerStorageAttachmentId: pulumi.String("string"),
	ResourceGroupId:              pulumi.String("string"),
	Timeouts: &ibm.ContainerStorageAttachmentTimeoutsArgs{
		Create: pulumi.String("string"),
		Delete: pulumi.String("string"),
	},
})
Copy
var containerStorageAttachmentResource = new ContainerStorageAttachment("containerStorageAttachmentResource", ContainerStorageAttachmentArgs.builder()
    .cluster("string")
    .volume("string")
    .worker("string")
    .containerStorageAttachmentId("string")
    .resourceGroupId("string")
    .timeouts(ContainerStorageAttachmentTimeoutsArgs.builder()
        .create("string")
        .delete("string")
        .build())
    .build());
Copy
container_storage_attachment_resource = ibm.ContainerStorageAttachment("containerStorageAttachmentResource",
    cluster="string",
    volume="string",
    worker="string",
    container_storage_attachment_id="string",
    resource_group_id="string",
    timeouts={
        "create": "string",
        "delete": "string",
    })
Copy
const containerStorageAttachmentResource = new ibm.ContainerStorageAttachment("containerStorageAttachmentResource", {
    cluster: "string",
    volume: "string",
    worker: "string",
    containerStorageAttachmentId: "string",
    resourceGroupId: "string",
    timeouts: {
        create: "string",
        "delete": "string",
    },
});
Copy
type: ibm:ContainerStorageAttachment
properties:
    cluster: string
    containerStorageAttachmentId: string
    resourceGroupId: string
    timeouts:
        create: string
        delete: string
    volume: string
    worker: string
Copy

ContainerStorageAttachment 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 ContainerStorageAttachment resource accepts the following input properties:

Cluster This property is required. string
The name or ID of the cluster.
Volume This property is required. string
The ID of the VPC block volume.
Worker This property is required. string
The ID of the VPC cluster worker node.
ContainerStorageAttachmentId string
The unique identifier of the worker storage resource. The id is composed of <cluster_name_id>/<worker_id><volume_attachment_id>.
ResourceGroupId string
ID of the resource group.
Timeouts ContainerStorageAttachmentTimeouts
Cluster This property is required. string
The name or ID of the cluster.
Volume This property is required. string
The ID of the VPC block volume.
Worker This property is required. string
The ID of the VPC cluster worker node.
ContainerStorageAttachmentId string
The unique identifier of the worker storage resource. The id is composed of <cluster_name_id>/<worker_id><volume_attachment_id>.
ResourceGroupId string
ID of the resource group.
Timeouts ContainerStorageAttachmentTimeoutsArgs
cluster This property is required. String
The name or ID of the cluster.
volume This property is required. String
The ID of the VPC block volume.
worker This property is required. String
The ID of the VPC cluster worker node.
containerStorageAttachmentId String
The unique identifier of the worker storage resource. The id is composed of <cluster_name_id>/<worker_id><volume_attachment_id>.
resourceGroupId String
ID of the resource group.
timeouts ContainerStorageAttachmentTimeouts
cluster This property is required. string
The name or ID of the cluster.
volume This property is required. string
The ID of the VPC block volume.
worker This property is required. string
The ID of the VPC cluster worker node.
containerStorageAttachmentId string
The unique identifier of the worker storage resource. The id is composed of <cluster_name_id>/<worker_id><volume_attachment_id>.
resourceGroupId string
ID of the resource group.
timeouts ContainerStorageAttachmentTimeouts
cluster This property is required. str
The name or ID of the cluster.
volume This property is required. str
The ID of the VPC block volume.
worker This property is required. str
The ID of the VPC cluster worker node.
container_storage_attachment_id str
The unique identifier of the worker storage resource. The id is composed of <cluster_name_id>/<worker_id><volume_attachment_id>.
resource_group_id str
ID of the resource group.
timeouts ContainerStorageAttachmentTimeoutsArgs
cluster This property is required. String
The name or ID of the cluster.
volume This property is required. String
The ID of the VPC block volume.
worker This property is required. String
The ID of the VPC cluster worker node.
containerStorageAttachmentId String
The unique identifier of the worker storage resource. The id is composed of <cluster_name_id>/<worker_id><volume_attachment_id>.
resourceGroupId String
ID of the resource group.
timeouts Property Map

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Status string
(String) The volume attachment status.
VolumeAttachmentId string
(String) The volume attachment ID.
VolumeAttachmentName string
(String) The volume attachment name.
VolumeType string
(String) The volume attachment type.
Id string
The provider-assigned unique ID for this managed resource.
Status string
(String) The volume attachment status.
VolumeAttachmentId string
(String) The volume attachment ID.
VolumeAttachmentName string
(String) The volume attachment name.
VolumeType string
(String) The volume attachment type.
id String
The provider-assigned unique ID for this managed resource.
status String
(String) The volume attachment status.
volumeAttachmentId String
(String) The volume attachment ID.
volumeAttachmentName String
(String) The volume attachment name.
volumeType String
(String) The volume attachment type.
id string
The provider-assigned unique ID for this managed resource.
status string
(String) The volume attachment status.
volumeAttachmentId string
(String) The volume attachment ID.
volumeAttachmentName string
(String) The volume attachment name.
volumeType string
(String) The volume attachment type.
id str
The provider-assigned unique ID for this managed resource.
status str
(String) The volume attachment status.
volume_attachment_id str
(String) The volume attachment ID.
volume_attachment_name str
(String) The volume attachment name.
volume_type str
(String) The volume attachment type.
id String
The provider-assigned unique ID for this managed resource.
status String
(String) The volume attachment status.
volumeAttachmentId String
(String) The volume attachment ID.
volumeAttachmentName String
(String) The volume attachment name.
volumeType String
(String) The volume attachment type.

Look up Existing ContainerStorageAttachment Resource

Get an existing ContainerStorageAttachment 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?: ContainerStorageAttachmentState, opts?: CustomResourceOptions): ContainerStorageAttachment
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        cluster: Optional[str] = None,
        container_storage_attachment_id: Optional[str] = None,
        resource_group_id: Optional[str] = None,
        status: Optional[str] = None,
        timeouts: Optional[ContainerStorageAttachmentTimeoutsArgs] = None,
        volume: Optional[str] = None,
        volume_attachment_id: Optional[str] = None,
        volume_attachment_name: Optional[str] = None,
        volume_type: Optional[str] = None,
        worker: Optional[str] = None) -> ContainerStorageAttachment
func GetContainerStorageAttachment(ctx *Context, name string, id IDInput, state *ContainerStorageAttachmentState, opts ...ResourceOption) (*ContainerStorageAttachment, error)
public static ContainerStorageAttachment Get(string name, Input<string> id, ContainerStorageAttachmentState? state, CustomResourceOptions? opts = null)
public static ContainerStorageAttachment get(String name, Output<String> id, ContainerStorageAttachmentState state, CustomResourceOptions options)
resources:  _:    type: ibm:ContainerStorageAttachment    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Cluster string
The name or ID of the cluster.
ContainerStorageAttachmentId string
The unique identifier of the worker storage resource. The id is composed of <cluster_name_id>/<worker_id><volume_attachment_id>.
ResourceGroupId string
ID of the resource group.
Status string
(String) The volume attachment status.
Timeouts ContainerStorageAttachmentTimeouts
Volume string
The ID of the VPC block volume.
VolumeAttachmentId string
(String) The volume attachment ID.
VolumeAttachmentName string
(String) The volume attachment name.
VolumeType string
(String) The volume attachment type.
Worker string
The ID of the VPC cluster worker node.
Cluster string
The name or ID of the cluster.
ContainerStorageAttachmentId string
The unique identifier of the worker storage resource. The id is composed of <cluster_name_id>/<worker_id><volume_attachment_id>.
ResourceGroupId string
ID of the resource group.
Status string
(String) The volume attachment status.
Timeouts ContainerStorageAttachmentTimeoutsArgs
Volume string
The ID of the VPC block volume.
VolumeAttachmentId string
(String) The volume attachment ID.
VolumeAttachmentName string
(String) The volume attachment name.
VolumeType string
(String) The volume attachment type.
Worker string
The ID of the VPC cluster worker node.
cluster String
The name or ID of the cluster.
containerStorageAttachmentId String
The unique identifier of the worker storage resource. The id is composed of <cluster_name_id>/<worker_id><volume_attachment_id>.
resourceGroupId String
ID of the resource group.
status String
(String) The volume attachment status.
timeouts ContainerStorageAttachmentTimeouts
volume String
The ID of the VPC block volume.
volumeAttachmentId String
(String) The volume attachment ID.
volumeAttachmentName String
(String) The volume attachment name.
volumeType String
(String) The volume attachment type.
worker String
The ID of the VPC cluster worker node.
cluster string
The name or ID of the cluster.
containerStorageAttachmentId string
The unique identifier of the worker storage resource. The id is composed of <cluster_name_id>/<worker_id><volume_attachment_id>.
resourceGroupId string
ID of the resource group.
status string
(String) The volume attachment status.
timeouts ContainerStorageAttachmentTimeouts
volume string
The ID of the VPC block volume.
volumeAttachmentId string
(String) The volume attachment ID.
volumeAttachmentName string
(String) The volume attachment name.
volumeType string
(String) The volume attachment type.
worker string
The ID of the VPC cluster worker node.
cluster str
The name or ID of the cluster.
container_storage_attachment_id str
The unique identifier of the worker storage resource. The id is composed of <cluster_name_id>/<worker_id><volume_attachment_id>.
resource_group_id str
ID of the resource group.
status str
(String) The volume attachment status.
timeouts ContainerStorageAttachmentTimeoutsArgs
volume str
The ID of the VPC block volume.
volume_attachment_id str
(String) The volume attachment ID.
volume_attachment_name str
(String) The volume attachment name.
volume_type str
(String) The volume attachment type.
worker str
The ID of the VPC cluster worker node.
cluster String
The name or ID of the cluster.
containerStorageAttachmentId String
The unique identifier of the worker storage resource. The id is composed of <cluster_name_id>/<worker_id><volume_attachment_id>.
resourceGroupId String
ID of the resource group.
status String
(String) The volume attachment status.
timeouts Property Map
volume String
The ID of the VPC block volume.
volumeAttachmentId String
(String) The volume attachment ID.
volumeAttachmentName String
(String) The volume attachment name.
volumeType String
(String) The volume attachment type.
worker String
The ID of the VPC cluster worker node.

Supporting Types

ContainerStorageAttachmentTimeouts
, ContainerStorageAttachmentTimeoutsArgs

Create string
Delete string
Create string
Delete string
create String
delete String
create string
delete string
create str
delete str
create String
delete String

Import

The ibm_container_storage_attachment can be imported using cluster_name_id, worker_id and volume_attachment_id

Example

$ pulumi import ibm:index/containerStorageAttachment:ContainerStorageAttachment example mycluster/kube-c08evsgd0anad0v8c76g-gen2newvpc-default-00000116/5c4f4d06e0dc402084922dea70850e3b-7cafe35
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

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