-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong rolearn in aws_auth_configmap_yaml #1819
Comments
I remember having this specified as you have in your PR, but I believe with testing, it was determined that the profile ARN is what is necessary in the config-map. I don't have time at the moment, but one way to know for certain is to deploy the Fargate profile example https://github.com/terraform-aws-modules/terraform-aws-eks/tree/master/examples/fargate_profile and verify what IAM resource is added in the config-map. When using EKS managed node groups or Fargate profiles, AWS updates the config-map with the associated roles. The output attribute provided is intended to mimic that functionality. I remember being shocked that the profile ARN was in the config map and not the IAM role - but its been a bit since then and I could have missed something |
thanks @bryantbiggs ! I actually checked by outputting aws_auth_configmap_yaml, but what was set was the Fargate Profile ARN.
The ConfigMap should have the ARN of the IAM role, but you will not get the correct IAM policy even if the Fargate Profile ARN is specified. |
I created a PR that sets the Pod Execution Role Arn, not the Fargate Profile ARN. |
ah yes, just re-ran this morning and you are correct. your PR looks good as well if you can just run the pre-commit hooks on it |
closed in #1820 |
@bryantbiggs |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Description
"data.maproles[].rolearn" set in aws_auth_configmap_yaml is not “Pod Execution Role ARN”. It is “Fargate Profile ARN”.
The correct policy is not attached to the user mapped in the aws-auth ConfigMap.
terraform-aws-eks/templates/aws_auth_cm.tpl
Lines 30 to 37 in 16f46db
Versions
Reproduction
terraform-aws-modules/eks/aws
module.eks.aws_auth_configmap_yaml
Code Snippet to Reproduce
Expected behavior
"data.maproles[].rolearn" should be set to “Pod Execution Role ARN”.
Actual behavior
set to "Fargate Profile ARN"
Additional context
The output of aws_auth_configmap_yaml does not have a Pod Execution Role ARN
terraform-aws-eks/outputs.tf
Lines 164 to 172 in be86c0b
templates/aws_auth_cm.tpl should also use the "Pod Execution Role ARN", not "Fargate Profile ARN"
terraform-aws-eks/templates/aws_auth_cm.tpl
Lines 30 to 32 in 16f46db
The examples are also Fargate Profile ARN
terraform-aws-eks/examples/complete/main.tf
Lines 299 to 319 in c45adce
The text was updated successfully, but these errors were encountered: