Skip to content
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

[Bug]: aws-load-balancer-controller cannot create tags #717

Closed
1 task done
caleb-devops opened this issue Jun 30, 2022 · 0 comments · Fixed by #718
Closed
1 task done

[Bug]: aws-load-balancer-controller cannot create tags #717

caleb-devops opened this issue Jun 30, 2022 · 0 comments · Fixed by #718
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@caleb-devops
Copy link
Contributor

Welcome to Amazon EKS Blueprints!

  • Yes, I've searched similar issues on GitHub and didn't find any.

Amazon EKS Blueprints Release version

v4.2.1

What is your environment, configuration and the example used?

module "eks_blueprints_kubernetes_addons" {
  source = "github.com/aws-ia/terraform-aws-eks-blueprints//modules/kubernetes-addons?ref=v4.2.1"

  enable_aws_load_balancer_controller = true
  aws_load_balancer_controller_helm_config = {
    set = [for key, value in data.aws_default_tags.default.tags : {
      name  = "defaultTags.${key}"
      value = value
    }]
  }
}

What did you do and What did you see instead?

The aws-load-balancer-controller fails to create target groups when defaultTags are used. Ingress resources report the following error:

Failed deploy model due to AccessDenied: User: arn:<aws-load-balancer-controller-sa> is not authorized to perform: elasticloadbalancing:AddTags on resource: arn:aws:elasticloadbalancing:<REGION>:<ACCOUNT>:listener/app/<LISTENER> because no identity-based policy allows the elasticloadbalancing:AddTags action

Additional Information

It looks like the following policy statement is missing from the aws-load-balancer-controller aws_iam_policy_document:


statement {
  sid    = ""
  effect = "Allow"

  resources = [
    "arn:${var.addon_context.aws_partition_id}:elasticloadbalancing:*:*:listener/net/*/*/*",
    "arn:${var.addon_context.aws_partition_id}:elasticloadbalancing:*:*:listener/app/*/*/*",
    "arn:${var.addon_context.aws_partition_id}:elasticloadbalancing:*:*:listener-rule/net/*/*/*",
    "arn:${var.addon_context.aws_partition_id}:elasticloadbalancing:*:*:listener-rule/app/*/*/*",
  ]

  actions = [
    "elasticloadbalancing:AddTags",
    "elasticloadbalancing:RemoveTags",
  ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants