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 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.
- Container
Storage stringAttachment Id - The unique identifier of the worker storage resource. The id is composed of <cluster_name_id>/<worker_id><volume_attachment_id>.
- Resource
Group stringId - ID of the resource group.
- Timeouts
Container
Storage Attachment Timeouts
- 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.
- Container
Storage stringAttachment Id - The unique identifier of the worker storage resource. The id is composed of <cluster_name_id>/<worker_id><volume_attachment_id>.
- Resource
Group stringId - ID of the resource group.
- Timeouts
Container
Storage Attachment Timeouts Args
- 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.
- container
Storage StringAttachment Id - The unique identifier of the worker storage resource. The id is composed of <cluster_name_id>/<worker_id><volume_attachment_id>.
- resource
Group StringId - ID of the resource group.
- timeouts
Container
Storage Attachment Timeouts
- 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.
- container
Storage stringAttachment Id - The unique identifier of the worker storage resource. The id is composed of <cluster_name_id>/<worker_id><volume_attachment_id>.
- resource
Group stringId - ID of the resource group.
- timeouts
Container
Storage Attachment Timeouts
- 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_ strattachment_ id - The unique identifier of the worker storage resource. The id is composed of <cluster_name_id>/<worker_id><volume_attachment_id>.
- resource_
group_ strid - ID of the resource group.
- timeouts
Container
Storage Attachment Timeouts Args
- 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.
- container
Storage StringAttachment Id - The unique identifier of the worker storage resource. The id is composed of <cluster_name_id>/<worker_id><volume_attachment_id>.
- resource
Group StringId - 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.
- Volume
Attachment stringId - (String) The volume attachment ID.
- Volume
Attachment stringName - (String) The volume attachment name.
- Volume
Type string - (String) The volume attachment type.
- Id string
- The provider-assigned unique ID for this managed resource.
- Status string
- (String) The volume attachment status.
- Volume
Attachment stringId - (String) The volume attachment ID.
- Volume
Attachment stringName - (String) The volume attachment name.
- Volume
Type string - (String) The volume attachment type.
- id String
- The provider-assigned unique ID for this managed resource.
- status String
- (String) The volume attachment status.
- volume
Attachment StringId - (String) The volume attachment ID.
- volume
Attachment StringName - (String) The volume attachment name.
- volume
Type String - (String) The volume attachment type.
- id string
- The provider-assigned unique ID for this managed resource.
- status string
- (String) The volume attachment status.
- volume
Attachment stringId - (String) The volume attachment ID.
- volume
Attachment stringName - (String) The volume attachment name.
- volume
Type 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_ strid - (String) The volume attachment ID.
- volume_
attachment_ strname - (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.
- volume
Attachment StringId - (String) The volume attachment ID.
- volume
Attachment StringName - (String) The volume attachment name.
- volume
Type 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.
- Cluster string
- The name or ID of the cluster.
- Container
Storage stringAttachment Id - The unique identifier of the worker storage resource. The id is composed of <cluster_name_id>/<worker_id><volume_attachment_id>.
- Resource
Group stringId - ID of the resource group.
- Status string
- (String) The volume attachment status.
- Timeouts
Container
Storage Attachment Timeouts - Volume string
- The ID of the VPC block volume.
- Volume
Attachment stringId - (String) The volume attachment ID.
- Volume
Attachment stringName - (String) The volume attachment name.
- Volume
Type 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.
- Container
Storage stringAttachment Id - The unique identifier of the worker storage resource. The id is composed of <cluster_name_id>/<worker_id><volume_attachment_id>.
- Resource
Group stringId - ID of the resource group.
- Status string
- (String) The volume attachment status.
- Timeouts
Container
Storage Attachment Timeouts Args - Volume string
- The ID of the VPC block volume.
- Volume
Attachment stringId - (String) The volume attachment ID.
- Volume
Attachment stringName - (String) The volume attachment name.
- Volume
Type 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.
- container
Storage StringAttachment Id - The unique identifier of the worker storage resource. The id is composed of <cluster_name_id>/<worker_id><volume_attachment_id>.
- resource
Group StringId - ID of the resource group.
- status String
- (String) The volume attachment status.
- timeouts
Container
Storage Attachment Timeouts - volume String
- The ID of the VPC block volume.
- volume
Attachment StringId - (String) The volume attachment ID.
- volume
Attachment StringName - (String) The volume attachment name.
- volume
Type 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.
- container
Storage stringAttachment Id - The unique identifier of the worker storage resource. The id is composed of <cluster_name_id>/<worker_id><volume_attachment_id>.
- resource
Group stringId - ID of the resource group.
- status string
- (String) The volume attachment status.
- timeouts
Container
Storage Attachment Timeouts - volume string
- The ID of the VPC block volume.
- volume
Attachment stringId - (String) The volume attachment ID.
- volume
Attachment stringName - (String) The volume attachment name.
- volume
Type 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_ strattachment_ id - The unique identifier of the worker storage resource. The id is composed of <cluster_name_id>/<worker_id><volume_attachment_id>.
- resource_
group_ strid - ID of the resource group.
- status str
- (String) The volume attachment status.
- timeouts
Container
Storage Attachment Timeouts Args - volume str
- The ID of the VPC block volume.
- volume_
attachment_ strid - (String) The volume attachment ID.
- volume_
attachment_ strname - (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.
- container
Storage StringAttachment Id - The unique identifier of the worker storage resource. The id is composed of <cluster_name_id>/<worker_id><volume_attachment_id>.
- resource
Group StringId - ID of the resource group.
- status String
- (String) The volume attachment status.
- timeouts Property Map
- volume String
- The ID of the VPC block volume.
- volume
Attachment StringId - (String) The volume attachment ID.
- volume
Attachment StringName - (String) The volume attachment name.
- volume
Type String - (String) The volume attachment type.
- worker String
- The ID of the VPC cluster worker node.
Supporting Types
ContainerStorageAttachmentTimeouts, ContainerStorageAttachmentTimeoutsArgs
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.