-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Closed
Description
Description
I read through the 18.x upgrade guide and it mentioned fargate_iam_role_name has been removed. Now there's a new fargate-profiles sub-module which has its own iam_role_name output, however I'm unable to access it in a similar way to how you could back in 17.x.
Versions
- Terraform: 1.1.3
- Module: EKS - 18.0.6
Reproduction
Code Snippet to Reproduce
resource "aws_iam_role_policy_attachment" "fluent_bit_eks_fargate" {
# The old way that works with v17.x:
# role = module.eks.fargate_iam_role_name
# ----------------------------------
role = module.eks.fargate_profiles.iam_role_name
policy_arn = aws_iam_policy.fluent_bit_eks_fargate.arn
depends_on = [module.eks]
}Expected behavior
Everything would work and the role name would be properly set.
Actual behavior
It throws this error:
│ on fluent_bit.tf line 28, in resource "aws_iam_role_policy_attachment" "fluent_bit_eks_fargate":
│ 28: role = module.eks.fargate_profiles.iam_role_name
│ ├────────────────
│ │ module.eks.fargate_profiles is object with 4 attributes
│
│ This object does not have an attribute named "iam_role_name".
This output is listed as available in:
terraform-aws-eks/modules/fargate-profile/outputs.tf
Lines 5 to 8 in cf985c2
| output "iam_role_name" { | |
| description = "The name of the IAM role" | |
| value = try(aws_iam_role.this[0].name, "") | |
| } |
I also tried using fargate_profile (no "s" at the end) but then it says the module isn't found.
francardoso93
Metadata
Metadata
Assignees
Labels
No labels