-
Notifications
You must be signed in to change notification settings - Fork 2
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
Not all resources are being automatically tagged #23
Comments
Hi @vwatinteg, thanks for reporting this, it's not a known issue. After a brief look I see there's also a Let me take a deeper look into this. |
The problem is twofold as I see it:
So, for now consider this as an unsupported use case and supply the tags manually. In the meantime I'll try to investigate a little bit more. |
@vwatinteg I tried to reproduce the issue. I created this minimal Pulumi program:
I also put a
From these |
@tlinhart Thanks for the sample, and kind of makes sense. I don't have a full sample right now and I'll try to work on that. From what I've noticed, the cluster and the EC2 instances/launch templates didn't have the 'global tags' and from the list of what should have tags, makes sense. |
Hmm, as I already posted, the EKS cluster should be tagged correctly. However, after reading the docs, there are some restrictions:
|
This is a new creation case, not update. But good to know since I would have that use case too. |
I think this is the same issue as with e.g. AWS Batch on AWS Fargate. You create a compute environment which implicitely creates an ECS cluster, but that won't be tagged. To actually tag it you have to manage a
And the same applies to e.g. EC2 instances in your case, that's why the |
If you provide an example that should work but doesn't (e.g. |
Would I be able to re-open this or I would need to create a new ticket? Can you keep it open for a day and if I can't get the sample just close it. |
Sure I'll leave it open for some time 👍 |
@tlinhart I have double checked and I was expecting EC2 instances to be tagged but the are not part of this code and the pulumi_eks cluster does not actually create ec2 instances, they use the launch template. So I think you can close this, besides the cluster actually not being tagged. Thank you! |
I tried it in the wild and can confirm that the EKS cluster ending without autotags which I consider a bug. At the moment I don't know if there's something that we can do about it i.e. if it's something inherent to how component resources and stack transformations work in general. Will try to ask Pulumi. I'll leave the issue opened for now. |
@vwatinteg I've been doing some more tests to see if the current approach works in general for component resources and it does. However, I found this by chance:
I'll get into it and try to migrate from transformation to transform to see if it helps. If it does, I'll probably release a new (major) version. |
Hi, I'm seeing some of my resources are not being automatically tagged.
requirements.txt
pulumi==3.120.0 pulumi_kubernetes==4.13.1 pulumi_aws==6.41.0 pulumi_aws_tags>=0.9.0 pulumi_eks==2.7.6
main.py
`from pulumi_aws_tags import register_auto_tags
...
register_auto_tags({"my": "tags"})
...
class myEKSClass:
...
def create():
cluster_args = eks.ClusterArgs(
name=self.name,
...
tags={"Name": "my-cluster-name"},
)
self.eks = eks.Cluster(self.name, cluster_args)
`
I was expecting the tags to show
{ "my": "tags", "Name": "my-cluster-name"}
However I'm only seeing {"Name": "my-cluster-name"}
Is this a known issue? Am I missing something?
The text was updated successfully, but these errors were encountered: