Terraform-aws-eks: Attach AWS Managed Policy To Worker Nodes IAM Role

Created on 17 Jan 2020  路  2Comments  路  Source: terraform-aws-modules/terraform-aws-eks

I have issues

No option to defined the Managed Policy(e.g. CloudWatchAgentServerPolicy) to Worker Nodes IAM Role.

I'm submitting a...

  • [ ] bug report
  • [ ] feature request
  • support request - read the FAQ first!
  • [ ] kudos, thank you, warm fuzzy

What is the current behavior?

Right now, I can't find a way to define manage policies, to attach worker nodes role.

Most helpful comment

You can just attach a policy like this:

resource "aws_iam_policy_attachment" "my_policy" {
  name       = "eks_my_policy"
  roles      = [module.my_cluster.worker_iam_role_name]
  policy_arn = aws_iam_policy.my_policy.arn
}

All 2 comments

You can just attach a policy like this:

resource "aws_iam_policy_attachment" "my_policy" {
  name       = "eks_my_policy"
  roles      = [module.my_cluster.worker_iam_role_name]
  policy_arn = aws_iam_policy.my_policy.arn
}

@max-rocket-internet Thank you very much for your quick help.

Was this page helpful?
0 / 5 - 0 ratings