» kubernetes_secret
The resource provides mechanisms to inject containers with sensitive information, such as passwords, while keeping containers agnostic of Kubernetes. Secrets can be used to store sensitive information either as individual properties or coarse-grained entries like entire files or JSON blobs. The resource will by default create a secret which is available to any pod in the specified (or default) namespace.
Read more about security properties and risks involved with using Kubernetes secrets: Kubernetes reference
Note: All arguments including the secret data will be stored in the raw state as plain-text. Read more about sensitive data in state.
» Example Usage
data "kubernetes_secret" "example" {
metadata {
name = "basic-auth"
}
}
» Argument Reference
The following arguments are supported:
-
metadata
- (Required) Standard secret's metadata. For more info see Kubernetes reference
» Nested Blocks
»
metadata
» Arguments
-
name
- (Required) Name of the secret, must be unique. For more info see Kubernetes reference -
namespace
- (Optional) Namespace defines the space within which name of the secret must be unique.
» Attributes
-
generation
- A sequence number representing a specific generation of the desired state. -
resource_version
- An opaque value that represents the internal version of this secret that can be used by clients to determine when secret has changed. For more info see Kubernetes reference -
self_link
- A URL representing this secret. -
uid
- The unique in time and space value for this secret. For more info see Kubernetes reference
» Attribute Reference
-
data
- A map of the secret data. -
type
- The secret type. Defaults toOpaque
. For more info see Kubernetes reference