The Container Storage Interface (CSI) is a standard for exposing arbitrary block and file storage systems to containerized workloads on Container Orchestration Systems (COs) like Kubernetes.
resource "kubernetes_csi_driver_v1" "example" {
metadata {
name = "terraform-example"
}
spec {
attach_required = true
pod_info_on_mount = true
volume_lifecycle_modes = ["Ephemeral"]
}
}
The following arguments are supported:
metadata
- (Required) Standard CSI driver's metadata. For more info see Kubernetes referencespec
- (Required) The Specification of the CSI Driver.metadata
annotations
- (Optional) An unstructured key value map stored with the csi driver that may be used to store arbitrary metadata.generate_name
- (Optional) Prefix, used by the server, to generate a unique name ONLY IF the name
field has not been provided. This value will also be combined with a unique suffix. For more info see Kubernetes referencelabels
- (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the csi driver. May match selectors of replication controllers and services.spec
attach_required
- (Required) Indicates if the CSI volume driver requires an attachment operation.pod_info_on_mount
- (Optional) Indicates that the CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations.volume_lifecycle_modes
- (Optional) A list of volume types the CSI volume driver supports. values can be Persistent
and Ephemeral
.generation
- A sequence number representing a specific generation of the desired state.resource_version
- An opaque value that represents the internal version of this csi driver that can be used by clients to determine when csi driver has changed. For more info see Kubernetes referenceuid
- The unique in time and space value for this csi driver. For more info see Kubernetes referencekubernetes_csi_driver_v1 can be imported using its name, e.g.
$ terraform import kubernetes_csi_driver_v1.example terraform-example