File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
modules/workload-identity Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,15 @@ resource "kubernetes_service_account" "main" {
5353 count = var. use_existing_k8s_sa ? 0 : 1
5454
5555 automount_service_account_token = var. automount_service_account_token
56+
57+ dynamic "image_pull_secret" {
58+ for_each = var. image_pull_secrets
59+
60+ content {
61+ name = image_pull_secret. value
62+ }
63+ }
64+
5665 metadata {
5766 name = local. k8s_given_name
5867 namespace = var. namespace
Original file line number Diff line number Diff line change @@ -84,6 +84,12 @@ variable "automount_service_account_token" {
8484 default = false
8585}
8686
87+ variable "image_pull_secrets" {
88+ description = " A list of references to secrets in the same namespace to use for pulling any images in pods that reference this Service Account"
89+ type = list (string )
90+ default = []
91+ }
92+
8793variable "roles" {
8894 description = " A list of roles to be added to the created service account"
8995 type = list (string )
You can’t perform that action at this time.
0 commit comments