1. Packages
  2. Ibm Provider
  3. API Docs
  4. ContainerStorageAttachment
ibm 1.85.0 published on Sunday, Nov 9, 2025 by ibm-cloud
ibm logo
ibm 1.85.0 published on Sunday, Nov 9, 2025 by ibm-cloud

    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.

    Example Usage

    In the following example, you can create a storage attachment for a VPC cluster worker node:

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const resourceGroup = ibm.getResourceGroup({
        isDefault: true,
    });
    const vpc = new ibm.IsVpc("vpc", {name: "vpc"});
    const subnet = new ibm.IsSubnet("subnet", {
        name: "subnet",
        vpc: vpc.isVpcId,
        zone: "us-south-1",
        totalIpv4AddressCount: 256,
    });
    const clusterContainerVpcCluster = new ibm.ContainerVpcCluster("cluster", {
        name: "cluster",
        vpcId: vpc.isVpcId,
        flavor: "cx2.2x4",
        workerCount: 1,
        waitTill: "OneWorkerNodeReady",
        resourceGroupId: resourceGroup.then(resourceGroup => resourceGroup.id),
        zones: [{
            subnetId: subnet.isSubnetId,
            name: "us-south-1",
        }],
        workerLabels: {
            test: "test-default-pool",
            test1: "test-default-pool1",
            test2: "test-default-pool2",
        },
    });
    const storage = new ibm.IsVolume("storage", {
        name: "volume",
        profile: "10iops-tier",
        zone: "us-south-1",
    });
    const cluster = ibm.getContainerVpcClusterOutput({
        name: clusterContainerVpcCluster.containerVpcClusterId,
    });
    const volumeAttach = new ibm.ContainerStorageAttachment("volume_attach", {
        volume: storage.isVolumeId,
        cluster: clusterContainerVpcCluster.containerVpcClusterId,
        worker: cluster.apply(cluster => cluster.workers?.[0]),
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    resource_group = ibm.get_resource_group(is_default=True)
    vpc = ibm.IsVpc("vpc", name="vpc")
    subnet = ibm.IsSubnet("subnet",
        name="subnet",
        vpc=vpc.is_vpc_id,
        zone="us-south-1",
        total_ipv4_address_count=256)
    cluster_container_vpc_cluster = ibm.ContainerVpcCluster("cluster",
        name="cluster",
        vpc_id=vpc.is_vpc_id,
        flavor="cx2.2x4",
        worker_count=1,
        wait_till="OneWorkerNodeReady",
        resource_group_id=resource_group.id,
        zones=[{
            "subnet_id": subnet.is_subnet_id,
            "name": "us-south-1",
        }],
        worker_labels={
            "test": "test-default-pool",
            "test1": "test-default-pool1",
            "test2": "test-default-pool2",
        })
    storage = ibm.IsVolume("storage",
        name="volume",
        profile="10iops-tier",
        zone="us-south-1")
    cluster = ibm.get_container_vpc_cluster_output(name=cluster_container_vpc_cluster.container_vpc_cluster_id)
    volume_attach = ibm.ContainerStorageAttachment("volume_attach",
        volume=storage.is_volume_id,
        cluster=cluster_container_vpc_cluster.container_vpc_cluster_id,
        worker=cluster.workers[0])
    
    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 {
    		resourceGroup, err := ibm.LookupResourceGroup(ctx, &ibm.LookupResourceGroupArgs{
    			IsDefault: pulumi.BoolRef(true),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		vpc, err := ibm.NewIsVpc(ctx, "vpc", &ibm.IsVpcArgs{
    			Name: pulumi.String("vpc"),
    		})
    		if err != nil {
    			return err
    		}
    		subnet, err := ibm.NewIsSubnet(ctx, "subnet", &ibm.IsSubnetArgs{
    			Name:                  pulumi.String("subnet"),
    			Vpc:                   vpc.IsVpcId,
    			Zone:                  pulumi.String("us-south-1"),
    			TotalIpv4AddressCount: pulumi.Float64(256),
    		})
    		if err != nil {
    			return err
    		}
    		clusterContainerVpcCluster, err := ibm.NewContainerVpcCluster(ctx, "cluster", &ibm.ContainerVpcClusterArgs{
    			Name:            pulumi.String("cluster"),
    			VpcId:           vpc.IsVpcId,
    			Flavor:          pulumi.String("cx2.2x4"),
    			WorkerCount:     pulumi.Float64(1),
    			WaitTill:        pulumi.String("OneWorkerNodeReady"),
    			ResourceGroupId: pulumi.String(resourceGroup.Id),
    			Zones: ibm.ContainerVpcClusterZoneArray{
    				&ibm.ContainerVpcClusterZoneArgs{
    					SubnetId: subnet.IsSubnetId,
    					Name:     pulumi.String("us-south-1"),
    				},
    			},
    			WorkerLabels: pulumi.StringMap{
    				"test":  pulumi.String("test-default-pool"),
    				"test1": pulumi.String("test-default-pool1"),
    				"test2": pulumi.String("test-default-pool2"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		storage, err := ibm.NewIsVolume(ctx, "storage", &ibm.IsVolumeArgs{
    			Name:    pulumi.String("volume"),
    			Profile: pulumi.String("10iops-tier"),
    			Zone:    pulumi.String("us-south-1"),
    		})
    		if err != nil {
    			return err
    		}
    		cluster := ibm.LookupContainerVpcClusterOutput(ctx, ibm.GetContainerVpcClusterOutputArgs{
    			Name: clusterContainerVpcCluster.ContainerVpcClusterId,
    		}, nil)
    		_, err = ibm.NewContainerStorageAttachment(ctx, "volume_attach", &ibm.ContainerStorageAttachmentArgs{
    			Volume:  storage.IsVolumeId,
    			Cluster: clusterContainerVpcCluster.ContainerVpcClusterId,
    			Worker: pulumi.String(cluster.ApplyT(func(cluster ibm.GetContainerVpcClusterResult) (*string, error) {
    				return &cluster.Workers[0], nil
    			}).(pulumi.StringPtrOutput)),
    		})
    		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 resourceGroup = Ibm.GetResourceGroup.Invoke(new()
        {
            IsDefault = true,
        });
    
        var vpc = new Ibm.IsVpc("vpc", new()
        {
            Name = "vpc",
        });
    
        var subnet = new Ibm.IsSubnet("subnet", new()
        {
            Name = "subnet",
            Vpc = vpc.IsVpcId,
            Zone = "us-south-1",
            TotalIpv4AddressCount = 256,
        });
    
        var clusterContainerVpcCluster = new Ibm.ContainerVpcCluster("cluster", new()
        {
            Name = "cluster",
            VpcId = vpc.IsVpcId,
            Flavor = "cx2.2x4",
            WorkerCount = 1,
            WaitTill = "OneWorkerNodeReady",
            ResourceGroupId = resourceGroup.Apply(getResourceGroupResult => getResourceGroupResult.Id),
            Zones = new[]
            {
                new Ibm.Inputs.ContainerVpcClusterZoneArgs
                {
                    SubnetId = subnet.IsSubnetId,
                    Name = "us-south-1",
                },
            },
            WorkerLabels = 
            {
                { "test", "test-default-pool" },
                { "test1", "test-default-pool1" },
                { "test2", "test-default-pool2" },
            },
        });
    
        var storage = new Ibm.IsVolume("storage", new()
        {
            Name = "volume",
            Profile = "10iops-tier",
            Zone = "us-south-1",
        });
    
        var cluster = Ibm.GetContainerVpcCluster.Invoke(new()
        {
            Name = clusterContainerVpcCluster.ContainerVpcClusterId,
        });
    
        var volumeAttach = new Ibm.ContainerStorageAttachment("volume_attach", new()
        {
            Volume = storage.IsVolumeId,
            Cluster = clusterContainerVpcCluster.ContainerVpcClusterId,
            Worker = cluster.Apply(getContainerVpcClusterResult => getContainerVpcClusterResult.Workers[0]),
        });
    
    });
    
    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.GetResourceGroupArgs;
    import com.pulumi.ibm.IsVpc;
    import com.pulumi.ibm.IsVpcArgs;
    import com.pulumi.ibm.IsSubnet;
    import com.pulumi.ibm.IsSubnetArgs;
    import com.pulumi.ibm.ContainerVpcCluster;
    import com.pulumi.ibm.ContainerVpcClusterArgs;
    import com.pulumi.ibm.inputs.ContainerVpcClusterZoneArgs;
    import com.pulumi.ibm.IsVolume;
    import com.pulumi.ibm.IsVolumeArgs;
    import com.pulumi.ibm.inputs.GetContainerVpcClusterArgs;
    import com.pulumi.ibm.ContainerStorageAttachment;
    import com.pulumi.ibm.ContainerStorageAttachmentArgs;
    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 resourceGroup = IbmFunctions.getResourceGroup(GetResourceGroupArgs.builder()
                .isDefault(true)
                .build());
    
            var vpc = new IsVpc("vpc", IsVpcArgs.builder()
                .name("vpc")
                .build());
    
            var subnet = new IsSubnet("subnet", IsSubnetArgs.builder()
                .name("subnet")
                .vpc(vpc.isVpcId())
                .zone("us-south-1")
                .totalIpv4AddressCount(256.0)
                .build());
    
            var clusterContainerVpcCluster = new ContainerVpcCluster("clusterContainerVpcCluster", ContainerVpcClusterArgs.builder()
                .name("cluster")
                .vpcId(vpc.isVpcId())
                .flavor("cx2.2x4")
                .workerCount(1.0)
                .waitTill("OneWorkerNodeReady")
                .resourceGroupId(resourceGroup.id())
                .zones(ContainerVpcClusterZoneArgs.builder()
                    .subnetId(subnet.isSubnetId())
                    .name("us-south-1")
                    .build())
                .workerLabels(Map.ofEntries(
                    Map.entry("test", "test-default-pool"),
                    Map.entry("test1", "test-default-pool1"),
                    Map.entry("test2", "test-default-pool2")
                ))
                .build());
    
            var storage = new IsVolume("storage", IsVolumeArgs.builder()
                .name("volume")
                .profile("10iops-tier")
                .zone("us-south-1")
                .build());
    
            final var cluster = IbmFunctions.getContainerVpcCluster(GetContainerVpcClusterArgs.builder()
                .name(clusterContainerVpcCluster.containerVpcClusterId())
                .build());
    
            var volumeAttach = new ContainerStorageAttachment("volumeAttach", ContainerStorageAttachmentArgs.builder()
                .volume(storage.isVolumeId())
                .cluster(clusterContainerVpcCluster.containerVpcClusterId())
                .worker(cluster.applyValue(_cluster -> _cluster.workers()[0]))
                .build());
    
        }
    }
    
    resources:
      vpc:
        type: ibm:IsVpc
        properties:
          name: vpc
      subnet:
        type: ibm:IsSubnet
        properties:
          name: subnet
          vpc: ${vpc.isVpcId}
          zone: us-south-1
          totalIpv4AddressCount: 256
      clusterContainerVpcCluster:
        type: ibm:ContainerVpcCluster
        name: cluster
        properties:
          name: cluster
          vpcId: ${vpc.isVpcId}
          flavor: cx2.2x4
          workerCount: 1
          waitTill: OneWorkerNodeReady
          resourceGroupId: ${resourceGroup.id}
          zones:
            - subnetId: ${subnet.isSubnetId}
              name: us-south-1
          workerLabels:
            test: test-default-pool
            test1: test-default-pool1
            test2: test-default-pool2
      storage:
        type: ibm:IsVolume
        properties:
          name: volume
          profile: 10iops-tier
          zone: us-south-1
      volumeAttach:
        type: ibm:ContainerStorageAttachment
        name: volume_attach
        properties:
          volume: ${storage.isVolumeId}
          cluster: ${clusterContainerVpcCluster.containerVpcClusterId}
          worker: ${cluster.workers[0]}
    variables:
      resourceGroup:
        fn::invoke:
          function: ibm:getResourceGroup
          arguments:
            isDefault: 'true'
      cluster:
        fn::invoke:
          function: ibm:getContainerVpcCluster
          arguments:
            name: ${clusterContainerVpcCluster.containerVpcClusterId}
    

    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 string
    The unique name of the resource.
    args ContainerStorageAttachmentArgs
    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 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 string
    The unique name of the resource.
    args ContainerStorageAttachmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ContainerStorageAttachmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args 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",
        },
    });
    
    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"),
    	},
    })
    
    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());
    
    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",
        })
    
    const containerStorageAttachmentResource = new ibm.ContainerStorageAttachment("containerStorageAttachmentResource", {
        cluster: "string",
        volume: "string",
        worker: "string",
        containerStorageAttachmentId: "string",
        resourceGroupId: "string",
        timeouts: {
            create: "string",
            "delete": "string",
        },
    });
    
    type: ibm:ContainerStorageAttachment
    properties:
        cluster: string
        containerStorageAttachmentId: string
        resourceGroupId: string
        timeouts:
            create: string
            delete: string
        volume: string
        worker: string
    

    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 string
    The name or ID of the cluster.
    Volume string
    The ID of the VPC block volume.
    Worker 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 string
    The name or ID of the cluster.
    Volume string
    The ID of the VPC block volume.
    Worker 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 String
    The name or ID of the cluster.
    volume String
    The ID of the VPC block volume.
    worker 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 string
    The name or ID of the cluster.
    volume string
    The ID of the VPC block volume.
    worker 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 str
    The name or ID of the cluster.
    volume str
    The ID of the VPC block volume.
    worker 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 String
    The name or ID of the cluster.
    volume String
    The ID of the VPC block volume.
    worker 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
    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:
    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
    

    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.
    ibm logo
    ibm 1.85.0 published on Sunday, Nov 9, 2025 by ibm-cloud
      Meet Neo: Your AI Platform Teammate