Skip to content

Commit

Permalink
fix: Ensure role_name_condition is set correctly (#389)
Browse files Browse the repository at this point in the history
Co-authored-by: Bryant Biggs <bryantbiggs@gmail.com>
  • Loading branch information
mstiri and bryantbiggs authored Jun 29, 2023
1 parent 2b1c595 commit 0024928
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion examples/iam-role-for-service-accounts-eks/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ module "disabled" {
module "irsa_role" {
source = "../../modules/iam-role-for-service-accounts-eks"

role_name = local.name
role_name = local.name
allow_self_assume_role = true

oidc_providers = {
one = {
Expand Down
2 changes: 1 addition & 1 deletion modules/iam-role-for-service-accounts-eks/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ locals {
partition = data.aws_partition.current.partition
dns_suffix = data.aws_partition.current.dns_suffix
region = data.aws_region.current.name
role_name_condition = try(coalesce(var.role_name, "${var.role_name_prefix}*"), null)
role_name_condition = var.role_name != null ? var.role_name : "${var.role_name_prefix}*"
}
data "aws_iam_policy_document" "this" {
Expand Down

0 comments on commit 0024928

Please sign in to comment.