vault_kubernetes_auth_backend_role

Manages an Kubernetes auth backend role in a Vault server. See the Vault documentation for more information.

Example Usage

resource "vault_auth_backend" "kubernetes" {
  type = "kubernetes"
}

resource "vault_kubernetes_auth_backend_role" "example" {
  backend                          = vault_auth_backend.kubernetes.path
  role_name                        = "example-role"
  bound_service_account_names      = ["example"]
  bound_service_account_namespaces = ["example"]
  token_ttl                        = 3600
  token_policies                   = ["default", "dev", "prod"]
  audience                         = "vault"
}

Argument Reference

The following arguments are supported:

Common Token Arguments

These arguments are common across several Authentication Token resources since Vault 1.2. Its current value will be referenced at renewal time.

Attributes Reference

No additional attributes are exported by this resource.

Import

Kubernetes auth backend role can be imported using the path, e.g.

$ terraform import vault_kubernetes_auth_backend_role.foo auth/kubernetes/role/foo