Skip to content

Commit

Permalink
[TF Plugin Docs] - Edit data source template files -2 (#2530)
Browse files Browse the repository at this point in the history
  • Loading branch information
sheneska authored Jul 3, 2024
1 parent 7f97d5a commit 4d62449
Show file tree
Hide file tree
Showing 37 changed files with 4,856 additions and 2,616 deletions.
102 changes: 75 additions & 27 deletions docs/data-sources/persistent_volume_claim.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,46 +9,94 @@ description: |-

A PersistentVolumeClaim (PVC) is a request for storage by a user. This data source retrieves information about the specified PVC.

## Example Usage
<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `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))

### Optional

- `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))

### Read-Only

- `id` (String) The ID of this resource.

<a id="nestedblock--metadata"></a>
### Nested Schema for `metadata`

Optional:

- `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/
- `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
- `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/
- `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
- `namespace` (String) Namespace defines the space within which name of the persistent volume claim must be unique.

Read-Only:

- `generation` (Number) A sequence number representing a specific generation of the desired state.
- `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
- `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

```terraform
data "kubernetes_persistent_volume_claim" "example" {
metadata {
name = "terraform-example"
}
}
```

## Argument Reference
<a id="nestedblock--spec"></a>
### Nested Schema for `spec`

The following arguments are supported:
Optional:

* `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)
- `selector` (Block List) A label query over volumes to consider for binding. (see [below for nested schema](#nestedblock--spec--selector))
- `storage_class_name` (String) Name of the storage class requested by the claim
- `volume_mode` (String) Defines what type of volume is required by the claim.
- `volume_name` (String) The binding reference to the PersistentVolume backing this claim.

## Nested Blocks
Read-Only:

### `metadata`
- `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
- `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))

#### Arguments
<a id="nestedblock--spec--selector"></a>
### Nested Schema for `spec.selector`

* `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)
* `namespace` - (Optional) Namespace defines the space within which name of the persistent volume claim must be unique.
Optional:

#### Attributes
- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--selector--match_expressions))
- `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.

* `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 reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency)
* `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)
<a id="nestedblock--spec--selector--match_expressions"></a>
### Nested Schema for `spec.selector.match_expressions`

### `spec`
Optional:

#### Attributes
- `key` (String) The label key that the selector applies to.
- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`.
- `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.

* `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)
* `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)
* `volume_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 reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#volume-mode)


<a id="nestedatt--spec--resources"></a>
### Nested Schema for `spec.resources`

Read-Only:

- `limits` (Map of String)
- `requests` (Map of String)





## Example Usage

```terraform
data "kubernetes_persistent_volume_claim" "example" {
metadata {
name = "terraform-example"
}
}
```

## Import

Expand Down
102 changes: 75 additions & 27 deletions docs/data-sources/persistent_volume_claim_v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,46 +9,94 @@ description: |-

A PersistentVolumeClaim (PVC) is a request for storage by a user. This data source retrieves information about the specified PVC.

## Example Usage
<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `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))

### Optional

- `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))

### Read-Only

- `id` (String) The ID of this resource.

<a id="nestedblock--metadata"></a>
### Nested Schema for `metadata`

Optional:

- `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/
- `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
- `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/
- `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
- `namespace` (String) Namespace defines the space within which name of the persistent volume claim must be unique.

Read-Only:

- `generation` (Number) A sequence number representing a specific generation of the desired state.
- `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
- `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

```terraform
data "kubernetes_persistent_volume_claim_v1" "example" {
metadata {
name = "terraform-example"
}
}
```

## Argument Reference
<a id="nestedblock--spec"></a>
### Nested Schema for `spec`

The following arguments are supported:
Optional:

* `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)
- `selector` (Block List) A label query over volumes to consider for binding. (see [below for nested schema](#nestedblock--spec--selector))
- `storage_class_name` (String) Name of the storage class requested by the claim
- `volume_mode` (String) Defines what type of volume is required by the claim.
- `volume_name` (String) The binding reference to the PersistentVolume backing this claim.

## Nested Blocks
Read-Only:

### `metadata`
- `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
- `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))

#### Arguments
<a id="nestedblock--spec--selector"></a>
### Nested Schema for `spec.selector`

* `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)
* `namespace` - (Optional) Namespace defines the space within which name of the persistent volume claim must be unique.
Optional:

#### Attributes
- `match_expressions` (Block List) A list of label selector requirements. The requirements are ANDed. (see [below for nested schema](#nestedblock--spec--selector--match_expressions))
- `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.

* `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 reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency)
* `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)
<a id="nestedblock--spec--selector--match_expressions"></a>
### Nested Schema for `spec.selector.match_expressions`

### `spec`
Optional:

#### Attributes
- `key` (String) The label key that the selector applies to.
- `operator` (String) A key's relationship to a set of values. Valid operators ard `In`, `NotIn`, `Exists` and `DoesNotExist`.
- `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.

* `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)
* `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)
* `volume_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 reference](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#volume-mode)


<a id="nestedatt--spec--resources"></a>
### Nested Schema for `spec.resources`

Read-Only:

- `limits` (Map of String)
- `requests` (Map of String)





## Example Usage

```terraform
data "kubernetes_persistent_volume_claim_v1" "example" {
metadata {
name = "terraform-example"
}
}
```

## Import

Expand Down
Loading

0 comments on commit 4d62449

Please sign in to comment.