Skip to content

Commit 72041db

Browse files
authored
Edit Template Files - TFPluginDocs (#2477)
1 parent d7cefb3 commit 72041db

File tree

396 files changed

+37695
-19880
lines changed

Some content is hidden

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

396 files changed

+37695
-19880
lines changed

.copywrite.hcl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@ project {
1111
".markdownlint.yml",
1212
".release/**",
1313
"vendor/**",
14+
"examples/**"
1415
]
1516
}

.markdownlint.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ MD013: false
1818
MD014: false
1919
MD022: false
2020
MD024: false
21+
MD029: false
22+
MD033: false
2123
MD034: false
24+
MD037: false
2225
MD038: false
2326
MD040: false
27+
MD046: false
2428
MD047: false

docs/resources/annotations.md

Lines changed: 34 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,40 @@ description: |-
99

1010
This resource allows Terraform to manage the annotations for a resource that already exists. This resource uses [field management](https://kubernetes.io/docs/reference/using-api/server-side-apply/#field-management) and [server-side apply](https://kubernetes.io/docs/reference/using-api/server-side-apply/) to manage only the annotations that are defined in the Terraform configuration. Existing annotations not specified in the configuration will be ignored. If an annotation specified in the config and is already managed by another client it will cause a conflict which can be overridden by setting `force` to true.
1111

12+
<!-- schema generated by tfplugindocs -->
13+
## Schema
14+
15+
### Required
16+
17+
- `api_version` (String) The apiVersion of the resource to annotate.
18+
- `kind` (String) The kind of the resource to annotate.
19+
- `metadata` (Block List, Min: 1, Max: 1) (see [below for nested schema](#nestedblock--metadata))
20+
21+
### Optional
22+
23+
- `annotations` (Map of String) A map of annotations to apply to the resource.
24+
- `field_manager` (String) Set the name of the field manager for the specified labels.
25+
- `force` (Boolean) Force overwriting annotations that were created or edited outside of Terraform.
26+
- `template_annotations` (Map of String) A map of annotations to apply to the resource template.
27+
28+
### Read-Only
29+
30+
- `id` (String) The ID of this resource.
31+
32+
<a id="nestedblock--metadata"></a>
33+
### Nested Schema for `metadata`
34+
35+
Required:
36+
37+
- `name` (String) The name of the resource.
38+
39+
Optional:
40+
41+
- `namespace` (String) The namespace of the resource.
42+
43+
44+
45+
1246
## Example Usage
1347

1448
```terraform
@@ -44,29 +78,6 @@ resource "kubernetes_annotations" "example" {
4478
}
4579
```
4680

47-
## Argument Reference
48-
49-
The following arguments are supported:
50-
51-
~> NOTE: At least one of `annotations` or `template_annotations` is required.
52-
53-
* `api_version` - (Required) The apiVersion of the resource to be annotated.
54-
* `kind` - (Required) The kind of the resource to be annotated.
55-
* `metadata` - (Required) Standard metadata of the resource to be annotated.
56-
* `annotations` - (Optional) A map of annotations to apply to the resource.
57-
* `template_annotations` - (Optional) A map of annotations to apply to the pod template within the resource.
58-
* `force` - (Optional) Force management of annotations if there is a conflict. Defaults to `false`.
59-
* `field_manager` - (Optional) The name of the [field manager](https://kubernetes.io/docs/reference/using-api/server-side-apply/#field-management). Defaults to `Terraform`.
60-
61-
## Nested Blocks
62-
63-
### `metadata`
64-
65-
#### Arguments
66-
67-
* `name` - (Required) Name of the resource to be annotated.
68-
* `namespace` - (Optional) Namespace of the resource to be annotated.
69-
7081
## Import
7182

7283
This resource does not support the `import` command. As this resource operates on Kubernetes resources that already exist, creating the resource is equivalent to importing it.

docs/resources/api_service.md

Lines changed: 61 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -9,77 +9,88 @@ description: |-
99

1010
An API Service is an abstraction which defines for locating and communicating with servers.
1111

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

14-
```terraform
15-
resource "kubernetes_api_service" "example" {
16-
metadata {
17-
name = "terraform-example"
18-
}
19-
spec {
20-
selector {
21-
app = "${kubernetes_pod.example.metadata.0.labels.app}"
22-
}
23-
session_affinity = "ClientIP"
24-
port {
25-
port = 8080
26-
target_port = 80
27-
}
15+
### Required
2816

29-
type = "LoadBalancer"
30-
}
31-
}
32-
```
17+
- `metadata` (Block List, Min: 1, Max: 1) Standard api_service'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+
- `spec` (Block List, Min: 1, Max: 1) Spec contains information for locating and communicating with a server. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status (see [below for nested schema](#nestedblock--spec))
19+
20+
### Read-Only
21+
22+
- `id` (String) The ID of this resource.
23+
24+
<a id="nestedblock--metadata"></a>
25+
### Nested Schema for `metadata`
3326

34-
## Argument Reference
27+
Optional:
3528

36-
The following arguments are supported:
29+
- `annotations` (Map of String) An unstructured key value map stored with the api_service that may be used to store arbitrary metadata. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
30+
- `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
31+
- `labels` (Map of String) Map of string keys and values that can be used to organize and categorize (scope and select) the api_service. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
32+
- `name` (String) Name of the api_service, must be unique. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
3733

38-
* `metadata` - (Required) Standard API service's metadata. For more info see [Kubernetes reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata)
39-
* `spec` - (Required) Spec contains information for locating and communicating with a server. [Kubernetes reference](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status)
34+
Read-Only:
4035

41-
## Nested Blocks
36+
- `generation` (Number) A sequence number representing a specific generation of the desired state.
37+
- `resource_version` (String) An opaque value that represents the internal version of this api_service that can be used by clients to determine when api_service has changed. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
38+
- `uid` (String) The unique in time and space value for this api_service. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
4239

43-
### `metadata`
4440

45-
#### Arguments
41+
<a id="nestedblock--spec"></a>
42+
### Nested Schema for `spec`
4643

47-
* `annotations` - (Optional) An unstructured key value map stored with the API service that may be used to store arbitrary metadata.
44+
Required:
4845

49-
~> By default, the provider ignores any annotations whose key names end with *kubernetes.io*. This is necessary because such annotations can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such annotations in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/)
46+
- `group` (String) Group is the API group name this server hosts.
47+
- `group_priority_minimum` (Number) GroupPriorityMinimum is the priority this group should have at least. Higher priority means that the group is preferred by clients over lower priority ones. Note that other versions of this group might specify even higher GroupPriorityMininum values such that the whole group gets a higher priority. The primary sort is based on GroupPriorityMinimum, ordered highest number to lowest (20 before 10). The secondary sort is based on the alphabetical comparison of the name of the object. (v1.bar before v1.foo) We'd recommend something like: *.k8s.io (except extensions) at 18000 and PaaSes (OpenShift, Deis) are recommended to be in the 2000s.
48+
- `version` (String) Version is the API version this server hosts. For example, `v1`.
49+
- `version_priority` (Number) VersionPriority controls the ordering of this API version inside of its group. Must be greater than zero. The primary sort is based on VersionPriority, ordered highest to lowest (20 before 10). Since it's inside of a group, the number can be small, probably in the 10s. In case of equal version priorities, the version string will be used to compute the order inside a group. If the version string is `kube-like`, it will sort above non `kube-like` version strings, which are ordered lexicographically. `Kube-like` versions start with a `v`, then are followed by a number (the major version), then optionally the string `alpha` or `beta` and another number (the minor version). These are sorted first by GA > `beta` > `alpha` (where GA is a version with no suffix such as `beta` or `alpha`), and then by comparing major version, then minor version. An example sorted list of versions: `v10`, `v2`, `v1`, `v11beta2`, `v10beta3`, `v3beta1`, `v12alpha1`, `v11alpha2`, `foo1`, `foo10`.
5050

51-
* `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 reference](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency)
52-
* `labels` - (Optional) Map of string keys and values that can be used to organize and categorize (scope and select) the API service.
51+
Optional:
5352

54-
~> By default, the provider ignores any labels whose key names end with *kubernetes.io*. This is necessary because such labels can be mutated by server-side components and consequently cause a perpetual diff in the Terraform plan output. If you explicitly specify any such labels in the configuration template then Terraform will consider these as normal resource attributes and manage them as expected (while still avoiding the perpetual diff problem). For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/)
53+
- `ca_bundle` (String) CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. If unspecified, system trust roots on the apiserver are used.
54+
- `insecure_skip_tls_verify` (Boolean) InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. This is strongly discouraged. You should use the CABundle instead.
55+
- `service` (Block List, Max: 1) Service is a reference to the service for this API server. It must communicate on port 443. If the Service is nil, that means the handling for the API groupversion is handled locally on this server. The call will simply delegate to the normal handler chain to be fulfilled. (see [below for nested schema](#nestedblock--spec--service))
5556

56-
* `name` - (Optional) Name of the API service, must be unique. Cannot be updated. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names)
57+
<a id="nestedblock--spec--service"></a>
58+
### Nested Schema for `spec.service`
5759

58-
#### Attributes
60+
Required:
5961

60-
* `generation` - A sequence number representing a specific generation of the desired state.
61-
* `resource_version` - An opaque value that represents the internal version of this API service that can be used by clients to determine when API service 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)
62-
* `uid` - The unique in time and space value for this API service. For more info see [Kubernetes reference](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids)
62+
- `name` (String) Name is the name of the service.
63+
- `namespace` (String) Namespace is the namespace of the service.
6364

64-
### `spec`
65+
Optional:
6566

66-
#### Arguments
67+
- `port` (Number) If specified, the port on the service that is hosting the service. Defaults to 443 for backward compatibility. Should be a valid port number (1-65535, inclusive).
6768

68-
* `ca_bundle` - (Optional) CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. If unspecified, system trust roots on the apiserver are used.
69-
* `group` - (Required) Group is the API group name this server hosts.
70-
* `group_priority_minimum` - (Required) GroupPriorityMininum is the priority this group should have at least. Higher priority means that the group is preferred by clients over lower priority ones. Note that other versions of this group might specify even higher GroupPriorityMininum values such that the whole group gets a higher priority. The primary sort is based on GroupPriorityMinimum, ordered highest number to lowest (20 before 10). The secondary sort is based on the alphabetical comparison of the name of the object. (v1.bar before v1.foo) We'd recommend something like: *.k8s.io (except extensions) at 18000 and PaaSes (OpenShift, Deis) are recommended to be in the 2000s.
71-
* `insecure_skip_tls_verify` - (Required) InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. This is strongly discouraged. You should use the CABundle instead.
72-
* `service` - (Optional) Service is a reference to the service for this API server. It must communicate on port 443. If the Service is nil, that means the handling for the API groupversion is handled locally on this server. The call will simply delegate to the normal handler chain to be fulfilled. See `service` block attributes below.
73-
* `version` - (Required) Version is the API version this server hosts. For example, `v1`.
74-
* `version_priority` - (Required) VersionPriority controls the ordering of this API version inside of its group. Must be greater than zero. The primary sort is based on VersionPriority, ordered highest to lowest (20 before 10). Since it's inside of a group, the number can be small, probably in the 10s. In case of equal version priorities, the version string will be used to compute the order inside a group. If the version string is `kube-like`, it will sort above non `kube-like` version strings, which are ordered lexicographically. `Kube-like` versions start with a `v`, then are followed by a number (the major version), then optionally the string `alpha` or `beta` and another number (the minor version). These are sorted first by GA > `beta` > `alpha` (where GA is a version with no suffix such as `beta` or `alpha`), and then by comparing major version, then minor version. An example sorted list of versions: `v10`, `v2`, `v1`, `v11beta2`, `v10beta3`, `v3beta1`, `v12alpha1`, `v11alpha2`, `foo1`, `foo10`..
7569

76-
### `service`
7770

78-
#### Arguments
7971

80-
* `name` - (Required) Name is the name of the service.
81-
* `namespace` - (Required) Namespace is the namespace of the service.
82-
* `port` - (Optional) If specified, the port on the service that is hosting the service. Defaults to 443 for backward compatibility. Should be a valid port number (1-65535, inclusive).
72+
73+
## Example Usage
74+
75+
```terraform
76+
resource "kubernetes_api_service" "example" {
77+
metadata {
78+
name = "terraform-example"
79+
}
80+
spec {
81+
selector {
82+
app = "${kubernetes_pod.example.metadata.0.labels.app}"
83+
}
84+
session_affinity = "ClientIP"
85+
port {
86+
port = 8080
87+
target_port = 80
88+
}
89+
90+
type = "LoadBalancer"
91+
}
92+
}
93+
```
8394

8495
## Import
8596

0 commit comments

Comments
 (0)