ibm.getContainerStorageAttachment
Explore with Pulumi AI
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.
- Volume
Attachment stringId - 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>.
- Resource
Group stringId
- Cluster string
- The name or ID of the cluster.
- Volume
Attachment stringId - 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>.
- Resource
Group stringId
- cluster String
- The name or ID of the cluster.
- volume
Attachment StringId - 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>.
- resource
Group StringId
- cluster string
- The name or ID of the cluster.
- volume
Attachment stringId - 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>.
- resource
Group stringId
- cluster str
- The name or ID of the cluster.
- volume_
attachment_ strid - 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_ strid
- cluster String
- The name or ID of the cluster.
- volume
Attachment StringId - 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>.
- resource
Group StringId
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.
- Volume
Attachment stringId - Volume
Attachment stringName - (String) The volume attachment name.
- Volume
Type string - (String) The volume attachment type.
- Worker string
- Resource
Group stringId
- 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.
- Volume
Attachment stringId - Volume
Attachment stringName - (String) The volume attachment name.
- Volume
Type string - (String) The volume attachment type.
- Worker string
- Resource
Group stringId
- 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.
- volume
Attachment StringId - volume
Attachment StringName - (String) The volume attachment name.
- volume
Type String - (String) The volume attachment type.
- worker String
- resource
Group StringId
- 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.
- volume
Attachment stringId - volume
Attachment stringName - (String) The volume attachment name.
- volume
Type string - (String) The volume attachment type.
- worker string
- resource
Group stringId
- 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_ strid - volume_
attachment_ strname - (String) The volume attachment name.
- volume_
type str - (String) The volume attachment type.
- worker str
- resource_
group_ strid
- 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.
- volume
Attachment StringId - volume
Attachment StringName - (String) The volume attachment name.
- volume
Type String - (String) The volume attachment type.
- worker String
- resource
Group StringId
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibm
Terraform Provider.