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

fix: Possible fix for issue #2006 #2008

Closed

Conversation

pcheung-sfdc
Copy link

Description

see issue #2006

Motivation and Context

see issue #2006

Breaking Changes

no breaking changes

How Has This Been Tested?

  • [x ] I have tested and validated these changes using one or more of the provided examples/* projects
  • Also tested on my own module using this eks module

@pcheung-sfdc pcheung-sfdc changed the title restrict cluster tags from being altered fix: Possible fix for issue #2006 Apr 11, 2022
@bryantbiggs
Copy link
Member

hi @pcheung-sfdc - I think there was a little misunderstanding. What I was suggesting in the issue was to use cluster_tags to solve your issue. So if you are setting a global name tag like:

module "eks" {
  name = var.cluster_name
	
  tags = {
    Name = "foo"
  }
}

You should be able to resolve your issue with:

module "eks" {
  name = var.cluster_name
	
  tags = {
    Name = "foo"
  }
  
  cluster_tags = {
    Name = var.cluster_name
  }
}

@pcheung-sfdc
Copy link
Author

pcheung-sfdc commented Apr 11, 2022

@bryantbiggs but the Name tag is not just the cluster name, it's the security group name in this case. If var.cluster_tags is only to be used by the security group then what you propose would make sense, but if cluster_tags is used for any other resource, having Name be a security group name wouldn't make sense for resources that are not security groups

@bryantbiggs
Copy link
Member

The primary security group is created by the EKS service - that service sets the name tag which appears to be the same name as the cluster name. So what I understood your issue to be was that you were changing the name tag in var.tags which breaks the link the EKS service uses to find the security group it created: correct?

@pcheung-sfdc
Copy link
Author

pcheung-sfdc commented Apr 11, 2022

So what I understood your issue to be was that you were changing the name tag in var.tags which breaks the link the EKS service uses to find the security group it created: correct?

yes, correct, except that it's not the same name as the cluster name. It contains the cluster-name and some prefix automatically generated (eks-cluster-sg), as well as a suffix (maybe a timestamp). So if we do what you propose, it would make a generic tag Name to represent only a very specific resource, also we have no way of determining what the suffix would be beforehand.

@bryantbiggs
Copy link
Member

ah, not sure why I thought I saw the name as the cluster name earlier but you are correct. one sec I think I know how to fix/avoid this
image

@antonbabenko
Copy link
Member

This issue has been resolved in version 18.20.2 🎉

@github-actions
Copy link

github-actions bot commented Nov 9, 2022

I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants