-
Notifications
You must be signed in to change notification settings - Fork 992
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
Add kubernetes_service_account data source #731
Add kubernetes_service_account data source #731
Conversation
Hi guys, can someone take a look at this PR? |
can we have this PR merged.. very useful feature.. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really great! Thanks for putting this together. I left a bunch of comments, but mostly to make improvements that we don't have yet in other parts of the repo. It's something we're striving toward, and relating to an upcoming refactor too. But this PR is in really good shape overall, thanks!
|
||
data "kubernetes_secret" "example" { | ||
metadata { | ||
name = "${kubernetes_service_account.example.default_secret_name}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my testing, this was needed in order for terraform to apply it.
name = "${kubernetes_service_account.example.default_secret_name}" | |
name = "${data.kubernetes_service_account.example.default_secret_name}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoopsie, missed that one. I think I originally meant to use resource "kubernetes_service_account" "example"
. Shall I change that?
@dak1n1, thanks for the thorough review, I'll rebase and address the issues! Andrei |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all looks good! Thanks for the quick response. The automated acceptance tests are passing for this branch, so we're ready to merge.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
This PR adds support for the kubernetes service account datasource.
This datasource makes it easy to get the auto-generated secret token from service accounts not directly managed by terraform (in our setup, we need to access a secret token created by a helm chart)