Skip to content

Commit 310648c

Browse files
authored
[TF Plugin Docs] - Edit data source template files (#2529)
1 parent ca45276 commit 310648c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+732
-899
lines changed

.markdownlint.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@ MD010: false
1616
MD012: false
1717
MD013: false
1818
MD014: false
19+
MD018: false
1920
MD022: false
2021
MD024: false
2122
MD029: false
23+
MD032: false
2224
MD033: false
2325
MD034: false
2426
MD037: false

docs/data-sources/all_namespaces.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,17 @@ description: |-
77

88
# kubernetes_all_namespaces
99

10-
This data source provides a mechanism for listing the names of all available namespaces in a Kubernetes cluster. It can be used to check for existence of a specific namespaces or to apply another resource to all or a subset of existing namespaces in a cluster.
10+
This data source provides a mechanism for listing the names of all available namespaces in a Kubernetes cluster. It can be used to check for existence of a specific namespaces or to apply another resource to all or a subset of existing namespaces in a cluster.In Kubernetes, namespaces provide a scope for names and are intended as a way to divide cluster resources between multiple users.
11+
12+
<!-- schema generated by tfplugindocs -->
13+
## Schema
14+
15+
### Read-Only
16+
17+
- `id` (String) The ID of this resource.
18+
- `namespaces` (List of String) List of all namespaces in a cluster.
19+
1120

12-
In Kubernetes, namespaces provide a scope for names and are intended as a way to divide cluster resources between multiple users.
1321

1422
## Example Usage
1523

docs/data-sources/config_map.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,46 @@ description: |-
55
This data source reads configuration data from a config map.
66
---
77

8-
# kubernetes_config map
8+
# kubernetes_config_map
99

1010
Config Maps are key-value pairs containing configuration data. The Config Map data source provides a mechanism for extracting these key-value pairs.
1111

12+
<!-- schema generated by tfplugindocs -->
13+
## Schema
14+
15+
### Required
16+
17+
- `metadata` (Block List, Min: 1, Max: 1) Standard config_map'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+
- `immutable` (Boolean) Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil.
22+
23+
### Read-Only
24+
25+
- `binary_data` (Map of String) A map of the config map binary data.
26+
- `data` (Map of String) A map of the config map data.
27+
- `id` (String) The ID of this resource.
28+
29+
<a id="nestedblock--metadata"></a>
30+
### Nested Schema for `metadata`
31+
32+
Optional:
33+
34+
- `annotations` (Map of String) An unstructured key value map stored with the config_map that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
35+
- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the config_map. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
36+
- `name` (String) Name of the config_map, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
37+
- `namespace` (String) Namespace defines the space within which name of the config_map must be unique.
38+
39+
Read-Only:
40+
41+
- `generation` (Number) A sequence number representing a specific generation of the desired state.
42+
- `resource_version` (String) An opaque value that represents the internal version of this config_map that can be used by clients to determine when config_map has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
43+
- `uid` (String) The unique in time and space value for this config_map. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
44+
45+
46+
47+
1248
~> **Note:** All arguments including the config map data will be stored in the raw state as plain-text. [Read more about sensitive data in state](/docs/state/sensitive-data.html).
1349

1450
## Example Usage

docs/data-sources/config_map_v1.md

Lines changed: 35 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,44 +5,54 @@ description: |-
55
This data source reads configuration data from a config map.
66
---
77

8-
# kubernetes_config map
8+
# kubernetes_config_map_v1
99

1010
Config Maps are key-value pairs containing configuration data. The Config Map data source provides a mechanism for extracting these key-value pairs.
1111

12-
~> **Note:** All arguments including the config map data will be stored in the raw state as plain-text. [Read more about sensitive data in state](/docs/state/sensitive-data.html).
12+
<!-- schema generated by tfplugindocs -->
13+
## Schema
1314

14-
## Example Usage
15+
### Required
1516

16-
```terraform
17-
data "kubernetes_config_map_v1" "example" {
18-
metadata {
19-
name = "my-config"
20-
}
21-
}
22-
```
17+
- `metadata` (Block List, Min: 1, Max: 1) Standard config_map'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+
- `immutable` (Boolean) Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil.
2322

24-
## Argument Reference
23+
### Read-Only
2524

26-
The following arguments are supported:
25+
- `binary_data` (Map of String) A map of the config map binary data.
26+
- `data` (Map of String) A map of the config map data.
27+
- `id` (String) The ID of this resource.
2728

28-
* `metadata` - (Required) Standard config map's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata)
29+
<a id="nestedblock--metadata"></a>
30+
### Nested Schema for `metadata`
2931

30-
## Nested Blocks
32+
Optional:
3133

32-
### `metadata`
34+
- `annotations` (Map of String) An unstructured key value map stored with the config_map that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
35+
- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the config_map. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
36+
- `name` (String) Name of the config_map, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
37+
- `namespace` (String) Namespace defines the space within which name of the config_map must be unique.
3338

34-
#### Arguments
39+
Read-Only:
3540

36-
* `name` - (Required) Name of the config map, must be unique. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names)
37-
* `namespace` - (Optional) Namespace defines the space within which name of the config map must be unique.
41+
- `generation` (Number) A sequence number representing a specific generation of the desired state.
42+
- `resource_version` (String) An opaque value that represents the internal version of this config_map that can be used by clients to determine when config_map has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
43+
- `uid` (String) The unique in time and space value for this config_map. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
3844

39-
#### Attributes
4045

41-
* `generation` - A sequence number representing a specific generation of the desired state.
42-
* `resource_version` - An opaque value that represents the internal version of this config map that can be used by clients to determine when config map 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)
43-
* `uid` - The unique in time and space value for this config map. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids)
4446

45-
## Attribute Reference
4647

47-
* `data` - A map of the config map data.
48-
* `binary_data` - A map of preserved non-UTF8 data. For more info see [Kubernetes API reference](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#configmap-v1-core).
48+
~> **Note:** All arguments including the config map data will be stored in the raw state as plain-text. [Read more about sensitive data in state](/docs/state/sensitive-data.html).
49+
50+
## Example Usage
51+
52+
```terraform
53+
data "kubernetes_config_map_v1" "example" {
54+
metadata {
55+
name = "my-config"
56+
}
57+
}
58+
```

docs/data-sources/endpoints_v1.md

Lines changed: 72 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -9,68 +9,98 @@ description: |-
99

1010
An Endpoints resource is an abstraction, linked to a Service, which defines the list of endpoints that actually implement the service.
1111

12-
## Example Usage
12+
<!-- schema generated by tfplugindocs -->
13+
## Schema
1314

14-
```terraform
15-
data "kubernetes_endpoints_v1" "api_endpoints" {
16-
metadata {
17-
name = "kubernetes"
18-
namespace = "default"
19-
}
20-
}
21-
```
15+
### Required
16+
17+
- `metadata` (Block List, Min: 1, Max: 1) Standard endpoints'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+
- `subset` (Block Set) Set of addresses and ports that comprise a service. More info: https://kubernetes.io/docs/concepts/services-networking/service/#services-without-selectors (see [below for nested schema](#nestedblock--subset))
22+
23+
### Read-Only
24+
25+
- `id` (String) The ID of this resource.
26+
27+
<a id="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 endpoints 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 endpoints. 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 endpoints, 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 endpoints must be unique.
2237

23-
## Argument Reference
38+
Read-Only:
2439

25-
The following arguments are supported:
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 endpoints that can be used by clients to determine when endpoints 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 endpoints. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
2643

27-
* `metadata` - (Required) Standard endpoints' metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata)
2844

29-
## Nested Blocks
45+
<a id="nestedblock--subset"></a>
46+
### Nested Schema for `subset`
3047

31-
### `metadata`
48+
Optional:
3249

33-
#### Arguments
50+
- `address` (Block Set) IP address which offers the related ports that are marked as ready. These endpoints should be considered safe for load balancers and clients to utilize. (see [below for nested schema](#nestedblock--subset--address))
51+
- `not_ready_address` (Block Set) IP address which offers the related ports but is not currently marked as ready because it have not yet finished starting, have recently failed a readiness check, or have recently failed a liveness check. (see [below for nested schema](#nestedblock--subset--not_ready_address))
52+
- `port` (Block Set) Port number available on the related IP addresses. (see [below for nested schema](#nestedblock--subset--port))
3453

35-
* `name` - (Required) Name of the endpoints resource.
36-
* `namespace` - (Optional) Namespace defines the space within which name of the endpoints resource must be unique.
54+
<a id="nestedblock--subset--address"></a>
55+
### Nested Schema for `subset.address`
3756

38-
#### Attributes
57+
Required:
3958

40-
* `generation` - A sequence number representing a specific generation of the desired state.
41-
* `resource_version` - An opaque value that represents the internal version of this endpoints resource that can be used by clients to determine when endpoints resource 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)
42-
* `uid` - The unique in time and space value for this endpoints resource. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids)
59+
- `ip` (String) The IP of this endpoint. May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24).
4360

44-
## Attribute Reference
61+
Optional:
4562

46-
### `subset`
63+
- `hostname` (String) The Hostname of this endpoint.
64+
- `node_name` (String) Node hosting this endpoint. This can be used to determine endpoints local to a node.
4765

48-
#### Attributes
4966

50-
* `address` - (Optional) An IP address block which offers the related ports and is ready to accept traffic. These endpoints should be considered safe for load balancers and clients to utilize. Can be repeated multiple times.
51-
* `not_ready_address` - (Optional) A IP address block which offers the related ports but is not currently marked as ready because it have not yet finished starting, have recently failed a readiness check, or have recently failed a liveness check. Can be repeated multiple times.
52-
* `port` - (Optional) A port number block available on the related IP addresses. Can be repeated multiple times.
67+
<a id="nestedblock--subset--not_ready_address"></a>
68+
### Nested Schema for `subset.not_ready_address`
5369

54-
### `address`
70+
Required:
5571

56-
#### Attributes
72+
- `ip` (String) The IP of this endpoint. May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24).
5773

58-
* `ip` - The IP of this endpoint. May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24).
59-
* `hostname` - (Optional) The Hostname of this endpoint.
60-
* `node_name` - (Optional) Node hosting this endpoint. This can be used to determine endpoints local to a node.
74+
Optional:
6175

62-
### `not_ready_address`
76+
- `hostname` (String) The Hostname of this endpoint.
77+
- `node_name` (String) Node hosting this endpoint. This can be used to determine endpoints local to a node.
6378

64-
#### Attributes
6579

66-
* `ip` - The IP of this endpoint. May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24).
67-
* `hostname` - (Optional) The Hostname of this endpoint.
68-
* `node_name` - (Optional) Node hosting this endpoint. This can be used to determine endpoints local to a node.
80+
<a id="nestedblock--subset--port"></a>
81+
### Nested Schema for `subset.port`
6982

70-
### `port`
83+
Required:
7184

72-
#### Attributes
85+
- `port` (Number) The port that will be exposed by this endpoint.
86+
87+
Optional:
88+
89+
- `name` (String) The name of this port within the endpoint. Must be a DNS_LABEL. Optional if only one Port is defined on this endpoint.
90+
- `protocol` (String) The IP protocol for this port. Supports `TCP` and `UDP`. Default is `TCP`.
91+
92+
93+
94+
95+
96+
## Example Usage
97+
98+
```terraform
99+
data "kubernetes_endpoints_v1" "api_endpoints" {
100+
metadata {
101+
name = "kubernetes"
102+
namespace = "default"
103+
}
104+
}
105+
```
73106

74-
* `name` - (Optional) The name of this port within the endpoint. All ports within the endpoint must have unique names. Optional if only one port is defined on this endpoint.
75-
* `port` - (Required) The port that will be utilized by this endpoint.
76-
* `protocol` - (Optional) The IP protocol for this port. Supports `TCP` and `UDP`. Default is `TCP`.

0 commit comments

Comments
 (0)