Title | Description |
---|---|
Kubernetes Secret Resource |
Creating the Kubernetes Secret resource. |
Manage a Kubernetes Secret using this Terraform module.
In managed clusters, both attached and provisioned, you can create Kubernetes Secret that you can manage through Tanzu Mission Control.
To create a cluster secret, you must be associated with the cluster.admin role
In the Tanzu Mission Control resource hierarchy, there is currently one levels at which you can specify cluster secret resources:
- Kubernetes objects -
cluster
block underscope
sub-resource
Note: The scope parameter is mandatory in the schema and the user needs to add one of the defined scopes to the script for the provider to function. Only one scope per resource is allowed.
# Read Tanzu Mission Control kubernetes secret : fetch namespace details
data "tanzu-mission-control_kubernetes_secret" "read_secret" {
name = "tf-secret" # Required
namespace_name = "tf-secret-namespace-name" # Required
scope {
cluster {
cluster_name = "testcluster" # Required
provisioner_name = "attached" # Default: attached
management_cluster_name = "attached" # Default: attached
}
}
}
name
(String) Name of the secret resource.namespace_name
(String) Name of Namespace where secret will be created.scope
(Block List, Min: 1, Max: 1) Scope for the secret having one of the valid scopes for secret: currently we have only cluster scope (see below for nested schema)
meta
(Block List, Max: 1) Metadata for the resource (see below for nested schema)org_id
(String) ID of Organization.
export
(Boolean) Export the secret to all namespaces.id
(String) The ID of this resource.spec
(List of Object) Spec for the kubernetes secret (see below for nested schema)status
(Map of String) Status for the Secret Export.
Optional:
cluster
(Block List, Max: 1) The schema for cluster secret full name (see below for nested schema)
Required:
cluster_name
(String) Name of this cluster
Optional:
management_cluster_name
(String) Name of the management clusterprovisioner_name
(String) Provisioner of the cluster
Optional:
annotations
(Map of String) Annotations for the resourcedescription
(String) Description of the resourcelabels
(Map of String) Labels for the resource
Read-Only:
resource_version
(String) Resource version of the resourceuid
(String) UID of the resource
Read-Only:
docker_config_json
(List of Object) (see below for nested schema)
Read-Only:
image_registry_url
(String)password
(String)username
(String)