terraform-provider-kubernetes
terraform-provider-kubernetes copied to clipboard
ephemeral resource: Add kubernetes_secret and kubernetes_secret_v1 support
Description
We fetch kubernetes secrets in terraform using data source, but they end up getting stored in terraform state file.
We would like to use the new feature "ephemeral resources" so that kubernetes secrets aren't stored in terraform state.
Potential Terraform Configuration
ephemeral "kubernetes_secret" "test_secret" {
metadata {
name = "test-secret"
namespace = "test-namespace"
}
}
locals {
test_secret_data = ephemeral.kubernetes_secret.test_secret.data["password"]
}
References
https://www.hashicorp.com/blog/terraform-1-10-improves-handling-secrets-in-state-with-ephemeral-values https://developer.hashicorp.com/terraform/language/resources/ephemeral
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment