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

ibm.getContainerStorageAttachment

Explore with Pulumi AI

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

    Import the details of a VPC storage volume attachment of a VPC worker node 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 VPC storage volume attachment, see Attaching a block storage volume.

    Example Usage

    In the following example, you can import a storage attachment of a VPC cluster worker node:

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const volumeAttach = ibm.getContainerStorageAttachment({
        cluster: "tf-cluster",
        volumeAttachmentId: "3567365d-7b9a-cc44-97ac-ef201653ea21",
        worker: "kube-c08evsgd0anad0v8c76g-gen2newvpc-default-00000116",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    volume_attach = ibm.get_container_storage_attachment(cluster="tf-cluster",
        volume_attachment_id="3567365d-7b9a-cc44-97ac-ef201653ea21",
        worker="kube-c08evsgd0anad0v8c76g-gen2newvpc-default-00000116")
    
    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.LookupContainerStorageAttachment(ctx, &ibm.LookupContainerStorageAttachmentArgs{
    			Cluster:            "tf-cluster",
    			VolumeAttachmentId: "3567365d-7b9a-cc44-97ac-ef201653ea21",
    			Worker:             "kube-c08evsgd0anad0v8c76g-gen2newvpc-default-00000116",
    		}, 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 volumeAttach = Ibm.GetContainerStorageAttachment.Invoke(new()
        {
            Cluster = "tf-cluster",
            VolumeAttachmentId = "3567365d-7b9a-cc44-97ac-ef201653ea21",
            Worker = "kube-c08evsgd0anad0v8c76g-gen2newvpc-default-00000116",
        });
    
    });
    
    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.GetContainerStorageAttachmentArgs;
    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 volumeAttach = IbmFunctions.getContainerStorageAttachment(GetContainerStorageAttachmentArgs.builder()
                .cluster("tf-cluster")
                .volumeAttachmentId("3567365d-7b9a-cc44-97ac-ef201653ea21")
                .worker("kube-c08evsgd0anad0v8c76g-gen2newvpc-default-00000116")
                .build());
    
        }
    }
    
    variables:
      volumeAttach:
        fn::invoke:
          function: ibm:getContainerStorageAttachment
          arguments:
            cluster: tf-cluster
            volumeAttachmentId: 3567365d-7b9a-cc44-97ac-ef201653ea21
            worker: kube-c08evsgd0anad0v8c76g-gen2newvpc-default-00000116
    

    Using getContainerStorageAttachment

    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 getContainerStorageAttachment(args: GetContainerStorageAttachmentArgs, opts?: InvokeOptions): Promise<GetContainerStorageAttachmentResult>
    function getContainerStorageAttachmentOutput(args: GetContainerStorageAttachmentOutputArgs, opts?: InvokeOptions): Output<GetContainerStorageAttachmentResult>
    def get_container_storage_attachment(cluster: Optional[str] = None,
                                         id: Optional[str] = None,
                                         resource_group_id: Optional[str] = None,
                                         volume_attachment_id: Optional[str] = None,
                                         worker: Optional[str] = None,
                                         opts: Optional[InvokeOptions] = None) -> GetContainerStorageAttachmentResult
    def get_container_storage_attachment_output(cluster: Optional[pulumi.Input[str]] = None,
                                         id: Optional[pulumi.Input[str]] = None,
                                         resource_group_id: Optional[pulumi.Input[str]] = None,
                                         volume_attachment_id: Optional[pulumi.Input[str]] = None,
                                         worker: Optional[pulumi.Input[str]] = None,
                                         opts: Optional[InvokeOptions] = None) -> Output[GetContainerStorageAttachmentResult]
    func LookupContainerStorageAttachment(ctx *Context, args *LookupContainerStorageAttachmentArgs, opts ...InvokeOption) (*LookupContainerStorageAttachmentResult, error)
    func LookupContainerStorageAttachmentOutput(ctx *Context, args *LookupContainerStorageAttachmentOutputArgs, opts ...InvokeOption) LookupContainerStorageAttachmentResultOutput

    > Note: This function is named LookupContainerStorageAttachment in the Go SDK.

    public static class GetContainerStorageAttachment 
    {
        public static Task<GetContainerStorageAttachmentResult> InvokeAsync(GetContainerStorageAttachmentArgs args, InvokeOptions? opts = null)
        public static Output<GetContainerStorageAttachmentResult> Invoke(GetContainerStorageAttachmentInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetContainerStorageAttachmentResult> getContainerStorageAttachment(GetContainerStorageAttachmentArgs args, InvokeOptions options)
    public static Output<GetContainerStorageAttachmentResult> getContainerStorageAttachment(GetContainerStorageAttachmentArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getContainerStorageAttachment:getContainerStorageAttachment
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Cluster string
    The name or ID of the cluster.
    VolumeAttachmentId string
    The VPC volume attachment ID.
    Worker string
    The VPC cluster worker node ID.
    Id string
    (String) The unique identifier of the worker storage resource. The id is composed of <cluster_name_id>/<worker_id><volume_attachment_id>.
    ResourceGroupId string
    Cluster string
    The name or ID of the cluster.
    VolumeAttachmentId string
    The VPC volume attachment ID.
    Worker string
    The VPC cluster worker node ID.
    Id string
    (String) The unique identifier of the worker storage resource. The id is composed of <cluster_name_id>/<worker_id><volume_attachment_id>.
    ResourceGroupId string
    cluster String
    The name or ID of the cluster.
    volumeAttachmentId String
    The VPC volume attachment ID.
    worker String
    The VPC cluster worker node ID.
    id String
    (String) The unique identifier of the worker storage resource. The id is composed of <cluster_name_id>/<worker_id><volume_attachment_id>.
    resourceGroupId String
    cluster string
    The name or ID of the cluster.
    volumeAttachmentId string
    The VPC volume attachment ID.
    worker string
    The VPC cluster worker node ID.
    id string
    (String) The unique identifier of the worker storage resource. The id is composed of <cluster_name_id>/<worker_id><volume_attachment_id>.
    resourceGroupId string
    cluster str
    The name or ID of the cluster.
    volume_attachment_id str
    The VPC volume attachment ID.
    worker str
    The VPC cluster worker node ID.
    id str
    (String) 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
    cluster String
    The name or ID of the cluster.
    volumeAttachmentId String
    The VPC volume attachment ID.
    worker String
    The VPC cluster worker node ID.
    id String
    (String) The unique identifier of the worker storage resource. The id is composed of <cluster_name_id>/<worker_id><volume_attachment_id>.
    resourceGroupId String

    getContainerStorageAttachment Result

    The following output properties are available:

    Cluster string
    Id string
    (String) The unique identifier of the worker storage resource. The id is composed of <cluster_name_id>/<worker_id><volume_attachment_id>.
    Status string
    (String) The volume attachment status.
    Volume string
    (String) The VPC volume ID.
    VolumeAttachmentId string
    VolumeAttachmentName string
    (String) The volume attachment name.
    VolumeType string
    (String) The volume attachment type.
    Worker string
    ResourceGroupId string
    Cluster string
    Id string
    (String) The unique identifier of the worker storage resource. The id is composed of <cluster_name_id>/<worker_id><volume_attachment_id>.
    Status string
    (String) The volume attachment status.
    Volume string
    (String) The VPC volume ID.
    VolumeAttachmentId string
    VolumeAttachmentName string
    (String) The volume attachment name.
    VolumeType string
    (String) The volume attachment type.
    Worker string
    ResourceGroupId string
    cluster String
    id String
    (String) The unique identifier of the worker storage resource. The id is composed of <cluster_name_id>/<worker_id><volume_attachment_id>.
    status String
    (String) The volume attachment status.
    volume String
    (String) The VPC volume ID.
    volumeAttachmentId String
    volumeAttachmentName String
    (String) The volume attachment name.
    volumeType String
    (String) The volume attachment type.
    worker String
    resourceGroupId String
    cluster string
    id string
    (String) The unique identifier of the worker storage resource. The id is composed of <cluster_name_id>/<worker_id><volume_attachment_id>.
    status string
    (String) The volume attachment status.
    volume string
    (String) The VPC volume ID.
    volumeAttachmentId string
    volumeAttachmentName string
    (String) The volume attachment name.
    volumeType string
    (String) The volume attachment type.
    worker string
    resourceGroupId string
    cluster str
    id str
    (String) The unique identifier of the worker storage resource. The id is composed of <cluster_name_id>/<worker_id><volume_attachment_id>.
    status str
    (String) The volume attachment status.
    volume str
    (String) The VPC volume ID.
    volume_attachment_id str
    volume_attachment_name str
    (String) The volume attachment name.
    volume_type str
    (String) The volume attachment type.
    worker str
    resource_group_id str
    cluster String
    id String
    (String) The unique identifier of the worker storage resource. The id is composed of <cluster_name_id>/<worker_id><volume_attachment_id>.
    status String
    (String) The volume attachment status.
    volume String
    (String) The VPC volume ID.
    volumeAttachmentId String
    volumeAttachmentName String
    (String) The volume attachment name.
    volumeType String
    (String) The volume attachment type.
    worker String
    resourceGroupId 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