Skip to content

Commit dffbd31

Browse files
kongdewenthunderbird86
authored andcommitted
fix: Sub-modules output the correct eks worker iam arn when workers utilize custom iam role (terraform-aws-modules#1912)
1 parent 915dc3a commit dffbd31

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

modules/eks-managed-node-group/outputs.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ output "iam_role_name" {
6666

6767
output "iam_role_arn" {
6868
description = "The Amazon Resource Name (ARN) specifying the IAM role"
69-
value = try(aws_iam_role.this[0].arn, "")
69+
value = try(aws_iam_role.this[0].arn, var.iam_role_arn)
7070
}
7171

7272
output "iam_role_unique_id" {

modules/fargate-profile/outputs.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ output "iam_role_name" {
99

1010
output "iam_role_arn" {
1111
description = "The Amazon Resource Name (ARN) specifying the IAM role"
12-
value = try(aws_iam_role.this[0].arn, "")
12+
value = try(aws_iam_role.this[0].arn, var.iam_role_arn)
1313
}
1414

1515
output "iam_role_unique_id" {

modules/self-managed-node-group/outputs.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ output "iam_role_unique_id" {
124124

125125
output "iam_instance_profile_arn" {
126126
description = "ARN assigned by AWS to the instance profile"
127-
value = try(aws_iam_instance_profile.this[0].arn, "")
127+
value = try(aws_iam_instance_profile.this[0].arn, var.iam_instance_profile_arn)
128128
}
129129

130130
output "iam_instance_profile_id" {

0 commit comments

Comments
 (0)