Skip to content

Commit 082ce8d

Browse files
authored
fix: create irsa without iam_role_arns or iam_authorizing_role_arns
1 parent 3647c58 commit 082ce8d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ resource "aws_iam_service_linked_role" "default" {
8383

8484
# Role that pods can assume for access to elasticsearch and kibana
8585
resource "aws_iam_role" "elasticsearch_user" {
86-
count = module.this.enabled && var.create_elasticsearch_user_role && (length(var.iam_authorizing_role_arns) > 0 || length(var.iam_role_arns) > 0) ? 1 : 0
86+
count = module.this.enabled && var.create_elasticsearch_user_role && (length(var.iam_authorizing_role_arns) > 0 || length(var.iam_role_arns) > 0 || var.iam_irsa_openid_connect_provider_arn != "") ? 1 : 0
8787
name = module.user_label.id
8888
assume_role_policy = join("", data.aws_iam_policy_document.assume_role[*].json)
8989
description = "IAM Role to assume to access the Elasticsearch ${module.this.id} cluster"

0 commit comments

Comments
 (0)