Skip to content

Commit

Permalink
Update documentation by adding a note regarding default_secret_name.
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksandr Rybolovlev committed Mar 15, 2022
1 parent c419925 commit f4c68cf
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion kubernetes/data_source_kubernetes_service_account_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ variable "token_name" {
resource "kubernetes_service_account" "test" {
metadata {
name = "%s"
name = "%s"
}
secret {
name = var.token_name
Expand Down
2 changes: 2 additions & 0 deletions website/docs/d/service_account.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ The following arguments are supported:
* `secret` - A list of secrets associated with the service account.
* `default_secret_name` - Name of the default secret, containing service account token, created & managed by the service.

~> default_secret_name will try to find the secret containing the service account token that Kubernetes automatically created for the service account. In cases where there are multiple tokens and the provider cannot determine which was created by Kubernetes this attribute will be empty. When there is only one token associated with the service account this will be returned.

### `image_pull_secret`

#### Attributes
Expand Down
2 changes: 2 additions & 0 deletions website/docs/d/service_account_v1.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ The following arguments are supported:
* `secret` - A list of secrets associated with the service account.
* `default_secret_name` - Name of the default secret, containing service account token, created & managed by the service.

~> default_secret_name will try to find the secret containing the service account token that Kubernetes automatically created for the service account. In cases where there are multiple tokens and the provider cannot determine which was created by Kubernetes this attribute will be empty. When there is only one token associated with the service account this will be returned.

### `image_pull_secret`

#### Attributes
Expand Down
2 changes: 2 additions & 0 deletions website/docs/r/default_service_account.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ exported:

* `default_secret_name` - Name of the default secret, containing service account token, created & managed by the service.

~> default_secret_name will try to find the secret containing the service account token that Kubernetes automatically created for the service account. In cases where there are multiple tokens and the provider cannot determine which was created by Kubernetes this attribute will be empty. When there is only one token associated with the service account this will be returned.

## Destroying

If you remove a `kubernetes_default_service_account` resource from your configuration, Terraform will send a delete request to the Kubernetes API. Kubernetes will automatically replace this service account, but any customizations will be lost. If you no longer want to manage a default service account with Terraform, use `terraform state rm` to remove it from state before removing the configuration.
Expand Down
2 changes: 2 additions & 0 deletions website/docs/r/default_service_account_v1.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ exported:

* `default_secret_name` - Name of the default secret, containing service account token, created & managed by the service.

~> default_secret_name will try to find the secret containing the service account token that Kubernetes automatically created for the service account. In cases where there are multiple tokens and the provider cannot determine which was created by Kubernetes this attribute will be empty. When there is only one token associated with the service account this will be returned.

## Destroying

If you remove a `kubernetes_default_service_account_v1` resource from your configuration, Terraform will send a delete request to the Kubernetes API. Kubernetes will automatically replace this service account, but any customizations will be lost. If you no longer want to manage a default service account with Terraform, use `terraform state rm` to remove it from state before removing the configuration.
Expand Down
2 changes: 2 additions & 0 deletions website/docs/r/service_account.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ exported:

* `default_secret_name` - Name of the default secret, containing service account token, created & managed by the service.

~> default_secret_name will try to find the secret containing the service account token that Kubernetes automatically created for the service account. In cases where there are multiple tokens and the provider cannot determine which was created by Kubernetes this attribute will be empty. When there is only one token associated with the service account this will be returned.

## Import

Service account can be imported using the namespace and name, e.g.
Expand Down
2 changes: 2 additions & 0 deletions website/docs/r/service_account_v1.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ exported:

* `default_secret_name` - Name of the default secret, containing service account token, created & managed by the service.

~> default_secret_name will try to find the secret containing the service account token that Kubernetes automatically created for the service account. In cases where there are multiple tokens and the provider cannot determine which was created by Kubernetes this attribute will be empty. When there is only one token associated with the service account this will be returned.

## Import

Service account can be imported using the namespace and name, e.g.
Expand Down

0 comments on commit f4c68cf

Please sign in to comment.