Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ephemeral resource: Add kubernetes_secret and kubernetes_secret_v1 support #2670

Open
shivasheesh-yadav opened this issue Jan 15, 2025 · 0 comments
Assignees

Comments

@shivasheesh-yadav
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants