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

tagging not working correclty #1654

Closed
jin-ahn opened this issue Mar 24, 2022 · 5 comments
Closed

tagging not working correclty #1654

jin-ahn opened this issue Mar 24, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@jin-ahn
Copy link

jin-ahn commented Mar 24, 2022

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

cdktf & Language Versions

cdktf - 0.9.4
node - 16.2.0
typescript

Affected Resource(s)

I am creating a nodegroup for EKS with various tags. Certain tags do not show up in AWS at all. I have tried changing around the order and stuff but it will only show the same 5 tags and nothing more, nothing less

  customtag: {
    "Name": "eks-node",
    "kubernetes.io/role/internal-elb": '1',
    "kubernetes.io/role/elb": '1',
    "kubernetes.io/cluster/cluster-name": 'shared',
    "kubernetes.io/cluster/****-eks": 'owned',
    "k8s.io/cluster-autoscaler/****-eks": 'owned',
    "k8s.io/cluster-autoscaler/enabled": 'true',
    "environment": 'production',
    "k8s.io/cluster-autoscaler/node-template/resources/ephemeral-storage": "80G"
  },

Debug Output

There is no error output that I could find

Expected Behavior

All the listed tags would be added to the ASG that is created by terraform.

Actual Behavior

Tags are missing
image

Steps to Reproduce

Important Factoids

References

  • #0000
@jin-ahn jin-ahn added bug Something isn't working new Un-triaged issue labels Mar 24, 2022
@jsteinich
Copy link
Collaborator

How are you setting the tags in your cdktf code?

@jin-ahn
Copy link
Author

jin-ahn commented Mar 24, 2022

How are you setting the tags in your cdktf code?

I add them as part of the config in the constructor. @jsteinich

    const nodegroup = new EKS.EksNodeGroup(this, this.nodeGroupName, {
      clusterName: this.clusterName,
      instanceTypes: this.instanceTypes,
      nodeRoleArn: this.nodeGroupRoleArn,
      nodeGroupNamePrefix: this.nodeGroupName,
      subnetIds: this.subnetIds,
      amiType: this.amiType ?? "AL2_x86_64",
      lifecycle: {
        createBeforeDestroy: true,
      },
      scalingConfig: {
        desiredSize: config.desiredSize ?? 1,
        maxSize: config.maxSize ?? 2,
        minSize: config.minSize ?? 1
      },
      dependsOn: config.dependsOn,
      diskSize: config.diskSize ?? 20,
      labels: config.labels,
      tags: {
        "Name": "eks-node",
        "kubernetes.io/role/internal-elb": '1',
        "kubernetes.io/role/elb": '1',
        "kubernetes.io/cluster/cluster-name": 'shared',
        "kubernetes.io/cluster/****-eks": 'owned',
        "k8s.io/cluster-autoscaler/****-eks": 'owned',
        "k8s.io/cluster-autoscaler/enabled": 'true',
        "environment": 'production',
        "k8s.io/cluster-autoscaler/node-template/resources/ephemeral-storage": "80G"
      },
    })

I can tell that its at least getting some tags from my code because if you see my screen shot the following 3 are there

        "kubernetes.io/cluster/cluster-name": 'shared',
        "kubernetes.io/cluster/****-eks": 'owned',
        "k8s.io/cluster-autoscaler/****-eks": 'owned',

But for whatever reason all other tags I put in my code are ignored

@jin-ahn
Copy link
Author

jin-ahn commented Mar 25, 2022

I guess this is a known issue with terraform/aws terraform-aws-modules/terraform-aws-eks#860

@ansgarm
Copy link
Member

ansgarm commented Mar 25, 2022

Yeah, it seems like that is an upstream issue. Should we close this here?

@ansgarm ansgarm removed the new Un-triaged issue label Mar 25, 2022
@jin-ahn jin-ahn closed this as completed Mar 28, 2022
@github-actions
Copy link
Contributor

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've 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.

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

No branches or pull requests

3 participants