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

Add tags to EKS addons #247

Open
jbouse opened this issue Dec 12, 2024 · 0 comments
Open

Add tags to EKS addons #247

jbouse opened this issue Dec 12, 2024 · 0 comments

Comments

@jbouse
Copy link

jbouse commented Dec 12, 2024

Describe the Feature

Some AWS EKS AddOns require tags to be applied to them to be supported. AWS GuardDuty Agent comes to mind, and the IAM service role permissions look for a GuardDutyManaged tag being used. The current format of the addons variable and functionality do not allow for the application of this tag. The only option is to apply that tag to this EKS module itself as a whole, resulting in the tag being applied to every resource created by the module. If the cluster is already deployed and adding this, it presents a considerable change set, with some resources requiring complete replacement.

Expected Behavior

The addons variable is already a list of objects so it should be relatively easy to add a tags to the list and then add the tags parameter to the aws_eks_addon resource in main.tf to apply if non-null.

Use Case

The AWS GuardDutyAgent runtime EKS addon requires the tag GuardDutyManaged be added to the add-on deployed for GuardDuty to service role permissions to allow it to function correctly.

Describe Ideal Solution

As stated in the problem the aws-guardduty-agent EKS add-on requires the GuardDutyManaged tag to be set so rather than have:

{
  addon_name = "aws-guardduty-agent"
  addon_version = var.guardduty_version
  resolve_conflicts_on_create = "OVERWRITE"
  resolve_conflicts_on_update = "OVERWRITE"
  service_account_role_arn = null
}

added to the addons variable passed to the module you would have something along the lines of:

{
  addon_name = "aws-guardduty-agent"
  addon_version = var.guardduty_version
  resolve_conflicts_on_create = "OVERWRITE"
  resolve_conflicts_on_update = "OVERWRITE"
  service_account_role_arn = null
  tags = {
    GuardDutyManaged = "true"
  }
}

Alternatives Considered

No response

Additional Context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant