Last active
February 16, 2022 19:57
-
-
Save mikesmitty/a8cfe488ed75f27ec8ce7597a6c5fd1c to your computer and use it in GitHub Desktop.
workload identity
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
locals { | |
members = tolist([ | |
for i, v in setproduct(var.wli_namespaces, var.wli_services) : | |
"serviceAccount:your-project-id.svc.id.goog[${v[0]}/${v[1]}]" | |
]) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
members = [ | |
"serviceAccount:your-project-id.svc.id.goog[namespace-one/k8s-service-one]", | |
"serviceAccount:your-project-id.svc.id.goog[namespace-one/k8s-service-two]", | |
"serviceAccount:your-project-id.svc.id.goog[namespace-two/k8s-service-one]", | |
"serviceAccount:your-project-id.svc.id.goog[namespace-two/k8s-service-two]", | |
"serviceAccount:your-project-id.svc.id.goog[namespace-three/k8s-service-one]", | |
"serviceAccount:your-project-id.svc.id.goog[namespace-three/k8s-service-two]", | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wli_namespaces = ["namespace-one", "namespace-two", "namespace-three"] | |
wli_services = ["k8s-service-one", "k8s-service-one"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
variable "wli_namespaces" { | |
type = list(string) | |
} | |
variable "wli_services" { | |
type = list(string) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment