Skip to content

Commit e309e5b

Browse files
committed
feat: support multiple service accounts to assume role
1 parent 60e4bb7 commit e309e5b

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ data "aws_iam_policy_document" "assume_role" {
144144
condition {
145145
test = "StringLike"
146146
variable = join(":", [var.iam_irsa_openid_connect_provider_url, "sub"])
147-
values = [var.iam_irsa_service_account]
147+
values = compact(concat([var.iam_irsa_service_account], var.iam_irsa_service_accounts))
148148
}
149149
}
150150
}

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,12 @@ variable "iam_irsa_service_account" {
142142
description = "Kubernetes ServiceAccount to allow to access the Elastic Domain via IRSA"
143143
}
144144

145+
variable "iam_irsa_service_accounts" {
146+
type = list(string)
147+
default = []
148+
description = "Kubernetes ServiceAccounts to allow to access the Elastic Domain via IRSA"
149+
}
150+
145151
variable "zone_awareness_enabled" {
146152
type = bool
147153
default = true

0 commit comments

Comments
 (0)