Skip to content

Instantly share code, notes, and snippets.

@gmaliar
Created February 2, 2019 13:32
Show Gist options
  • Save gmaliar/831638b23d7f070dd36a39affd3b0c10 to your computer and use it in GitHub Desktop.
Save gmaliar/831638b23d7f070dd36a39affd3b0c10 to your computer and use it in GitHub Desktop.
resource "kubernetes_service_account" "vault-tokenreview" {
metadata {
name = "vault-tokenreview"
}
}
resource "kubernetes_cluster_role_binding" "vault-tokenreview-clusterrolebinding" {
metadata {
name = "vault-tokenreviewer"
}
role_ref {
api_group = "rbac.authorization.k8s.io"
kind = "ClusterRole"
name = "system:auth-delegator"
}
subject {
api_group = ""
kind = "ServiceAccount"
name = "${kubernetes_service_account.vault-tokenreview.metadata.0.name}"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment