You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/data-sources/persistent_volume_claim.md
+75-27Lines changed: 75 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,46 +9,94 @@ description: |-
9
9
10
10
A PersistentVolumeClaim (PVC) is a request for storage by a user. This data source retrieves information about the specified PVC.
11
11
12
-
## Example Usage
12
+
<!-- schema generated by tfplugindocs -->
13
+
## Schema
14
+
15
+
### Required
16
+
17
+
-`metadata` (Block List, Min: 1, Max: 1) Standard persistent volume claim's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata))
18
+
19
+
### Optional
20
+
21
+
-`spec` (Block List) Spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims (see [below for nested schema](#nestedblock--spec))
22
+
23
+
### Read-Only
24
+
25
+
-`id` (String) The ID of this resource.
26
+
27
+
<aid="nestedblock--metadata"></a>
28
+
### Nested Schema for `metadata`
29
+
30
+
Optional:
31
+
32
+
-`annotations` (Map of String) An unstructured key value map stored with the persistent volume claim that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
33
+
-`generate_name` (String) 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. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency
34
+
-`labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the persistent volume claim. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
35
+
-`name` (String) Name of the persistent volume claim, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
36
+
-`namespace` (String) Namespace defines the space within which name of the persistent volume claim must be unique.
37
+
38
+
Read-Only:
39
+
40
+
-`generation` (Number) A sequence number representing a specific generation of the desired state.
41
+
-`resource_version` (String) 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. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
42
+
-`uid` (String) The unique in time and space value for this persistent volume claim. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
13
43
14
-
```terraform
15
-
data "kubernetes_persistent_volume_claim" "example" {
16
-
metadata {
17
-
name = "terraform-example"
18
-
}
19
-
}
20
-
```
21
44
22
-
## Argument Reference
45
+
<aid="nestedblock--spec"></a>
46
+
### Nested Schema for `spec`
23
47
24
-
The following arguments are supported:
48
+
Optional:
25
49
26
-
*`metadata` - (Required) Standard persistent volume claim's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata)
50
+
-`selector` (Block List) A label query over volumes to consider for binding. (see [below for nested schema](#nestedblock--spec--selector))
51
+
-`storage_class_name` (String) Name of the storage class requested by the claim
52
+
-`volume_mode` (String) Defines what type of volume is required by the claim.
53
+
-`volume_name` (String) The binding reference to the PersistentVolume backing this claim.
27
54
28
-
## Nested Blocks
55
+
Read-Only:
29
56
30
-
### `metadata`
57
+
-`access_modes` (Set of String) A set of the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes
58
+
-`resources` (List of Object) A list of the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedatt--spec--resources))
31
59
32
-
#### Arguments
60
+
<aid="nestedblock--spec--selector"></a>
61
+
### Nested Schema for `spec.selector`
33
62
34
-
*`name` - (Required) Name of the persistent volume claim, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names)
35
-
*`namespace` - (Optional) Namespace defines the space within which name of the persistent volume claim must be unique.
63
+
Optional:
36
64
37
-
#### Attributes
65
+
-`match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--selector--match_expressions))
66
+
-`match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
38
67
39
-
*`generation` - A sequence number representing a specific generation of the desired state.
40
-
*`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 reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency)
41
-
*`uid` - The unique in time and space value for this persistent volume claim. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids)
### Nested Schema for `spec.selector.match_expressions`
42
70
43
-
### `spec`
71
+
Optional:
44
72
45
-
#### Attributes
73
+
-`key` (String) The label key that the selector applies to.
74
+
-`operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`.
75
+
-`values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch.
46
76
47
-
*`access_modes` - A set of the desired access modes the volume should have. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes)
48
-
*`selector` - Claims can specify a label selector to further filter the set of volumes. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#selector)
49
-
*`volume_name` - The binding reference to the PersistentVolume backing this claim.
50
-
*`storage_class_name` - Name of the storage class requested by the claim.
51
-
*`volume_mode` - (Optional) Defines what type of volume is required by the claim. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#volume-mode)
77
+
78
+
79
+
<aid="nestedatt--spec--resources"></a>
80
+
### Nested Schema for `spec.resources`
81
+
82
+
Read-Only:
83
+
84
+
-`limits` (Map of String)
85
+
-`requests` (Map of String)
86
+
87
+
88
+
89
+
90
+
91
+
## Example Usage
92
+
93
+
```terraform
94
+
data "kubernetes_persistent_volume_claim" "example" {
Copy file name to clipboardExpand all lines: docs/data-sources/persistent_volume_claim_v1.md
+75-27Lines changed: 75 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,46 +9,94 @@ description: |-
9
9
10
10
A PersistentVolumeClaim (PVC) is a request for storage by a user. This data source retrieves information about the specified PVC.
11
11
12
-
## Example Usage
12
+
<!-- schema generated by tfplugindocs -->
13
+
## Schema
14
+
15
+
### Required
16
+
17
+
-`metadata` (Block List, Min: 1, Max: 1) Standard persistent volume claim's metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata (see [below for nested schema](#nestedblock--metadata))
18
+
19
+
### Optional
20
+
21
+
-`spec` (Block List) Spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims (see [below for nested schema](#nestedblock--spec))
22
+
23
+
### Read-Only
24
+
25
+
-`id` (String) The ID of this resource.
26
+
27
+
<aid="nestedblock--metadata"></a>
28
+
### Nested Schema for `metadata`
29
+
30
+
Optional:
31
+
32
+
-`annotations` (Map of String) An unstructured key value map stored with the persistent volume claim that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
33
+
-`generate_name` (String) 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. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency
34
+
-`labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the persistent volume claim. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
35
+
-`name` (String) Name of the persistent volume claim, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
36
+
-`namespace` (String) Namespace defines the space within which name of the persistent volume claim must be unique.
37
+
38
+
Read-Only:
39
+
40
+
-`generation` (Number) A sequence number representing a specific generation of the desired state.
41
+
-`resource_version` (String) 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. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
42
+
-`uid` (String) The unique in time and space value for this persistent volume claim. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
13
43
14
-
```terraform
15
-
data "kubernetes_persistent_volume_claim_v1" "example" {
16
-
metadata {
17
-
name = "terraform-example"
18
-
}
19
-
}
20
-
```
21
44
22
-
## Argument Reference
45
+
<aid="nestedblock--spec"></a>
46
+
### Nested Schema for `spec`
23
47
24
-
The following arguments are supported:
48
+
Optional:
25
49
26
-
*`metadata` - (Required) Standard persistent volume claim's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata)
50
+
-`selector` (Block List) A label query over volumes to consider for binding. (see [below for nested schema](#nestedblock--spec--selector))
51
+
-`storage_class_name` (String) Name of the storage class requested by the claim
52
+
-`volume_mode` (String) Defines what type of volume is required by the claim.
53
+
-`volume_name` (String) The binding reference to the PersistentVolume backing this claim.
27
54
28
-
## Nested Blocks
55
+
Read-Only:
29
56
30
-
### `metadata`
57
+
-`access_modes` (Set of String) A set of the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes
58
+
-`resources` (List of Object) A list of the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources (see [below for nested schema](#nestedatt--spec--resources))
31
59
32
-
#### Arguments
60
+
<aid="nestedblock--spec--selector"></a>
61
+
### Nested Schema for `spec.selector`
33
62
34
-
*`name` - (Required) Name of the persistent volume claim, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names)
35
-
*`namespace` - (Optional) Namespace defines the space within which name of the persistent volume claim must be unique.
63
+
Optional:
36
64
37
-
#### Attributes
65
+
-`match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--selector--match_expressions))
66
+
-`match_labels` (Map of String) A map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of `match_expressions`, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
38
67
39
-
*`generation` - A sequence number representing a specific generation of the desired state.
40
-
*`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 reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency)
41
-
*`uid` - The unique in time and space value for this persistent volume claim. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids)
### Nested Schema for `spec.selector.match_expressions`
42
70
43
-
### `spec`
71
+
Optional:
44
72
45
-
#### Attributes
73
+
-`key` (String) The label key that the selector applies to.
74
+
-`operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`.
75
+
-`values` (Set of String) An array of string values. If the operator is `In` or `NotIn`, the values array must be non-empty. If the operator is `Exists` or `DoesNotExist`, the values array must be empty. This array is replaced during a strategic merge patch.
46
76
47
-
*`access_modes` - A set of the desired access modes the volume should have. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes)
48
-
*`selector` - Claims can specify a label selector to further filter the set of volumes. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#selector)
49
-
*`volume_name` - The binding reference to the PersistentVolume backing this claim.
50
-
*`storage_class_name` - Name of the storage class requested by the claim.
51
-
*`volume_mode` - (Optional) Defines what type of volume is required by the claim. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#volume-mode)
77
+
78
+
79
+
<aid="nestedatt--spec--resources"></a>
80
+
### Nested Schema for `spec.resources`
81
+
82
+
Read-Only:
83
+
84
+
-`limits` (Map of String)
85
+
-`requests` (Map of String)
86
+
87
+
88
+
89
+
90
+
91
+
## Example Usage
92
+
93
+
```terraform
94
+
data "kubernetes_persistent_volume_claim_v1" "example" {
0 commit comments