A PersistentVolumeClaim (PVC) is a request for storage by a user. This data source retrieves information about the specified PVC.
data "kubernetes_persistent_volume_claim" "example" {
metadata {
name = "terraform-example"
}
}
The following arguments are supported:
metadata
- (Required) Standard persistent volume claim's metadata. For more info see Kubernetes referencemetadata
name
- (Required) Name of the persistent volume claim, must be unique. Cannot be updated. For more info see Kubernetes referencenamespace
- (Optional) Namespace defines the space within which name of the persistent volume claim must be unique.generation
- A sequence number representing a specific generation of the desired state.resource_version
- An opaque value that represents the internal version of this persistent volume claim that can be used by clients to determine when persistent volume claim has changed. For more info see Kubernetes referenceuid
- The unique in time and space value for this persistent volume claim. For more info see Kubernetes referencespec
access_modes
- A set of the desired access modes the volume should have. For more info see Kubernetes referenceselector
- Claims can specify a label selector to further filter the set of volumes. For more info see Kubernetes referencevolume_name
- The binding reference to the PersistentVolume backing this claim.storage_class_name
- Name of the storage class requested by the claim.volume_mode
- (Optional) Defines what type of volume is required by the claim. For more info see Kubernetes referencePersistent Volume Claim can be imported using its namespace and name, e.g.
$ terraform import kubernetes_persistent_volume_claim.example default/example-name