https://pulumi.com logo
#aws
Title
# aws
b

bored-table-20691

01/07/2022, 5:51 AM
I think this has been asked before but my search here/GitHub/Google hasn’t really led to satisfying answers - what’s the best way to have a set of AWS tags apply to every resource, even if that resource is already created? As far as I understand,
defaultTags
doesn’t quite have this behavior, as it will not modify already existing resources unless there is something else that needs to update them, and it won’t really show that this is being done.
b

brave-planet-10645

01/07/2022, 10:34 AM
There's a few examples on how to auto-tag here: https://github.com/joeduffy/aws-tags-example
🔥 1
p

proud-art-41399

01/07/2022, 11:11 AM
If you happen to use Python, you can use a helper library to auto-tag the resources – https://github.com/tlinhart/pulumi-aws-tags
b

bored-table-20691

01/07/2022, 3:30 PM
Thank you. Joes repo is exactly what I needed. I am using Go, but the repo gives me what I need.
@brave-planet-10645 FYI in Go at least, the function doesn’t work for
pulumi-eks
resources properly -
args.Props
is nil on all of the AWS subresources it creates.
Copy code
aws:eks/cluster:Cluster &{0xc00011c1c0 aws:eks/cluster:Cluster okera-ssa-cluster-eksCluster <nil> [0xbdf1e0]}
    Skipping
    aws:ec2/securityGroup:SecurityGroup &{0xc0006362c0 aws:ec2/securityGroup:SecurityGroup okera-ssa-cluster-nodeSecurityGroup <nil> [0xbdf1e0]}
    Skipping
    aws:ec2/securityGroup:SecurityGroup &{0xc000636bb0 aws:ec2/securityGroup:SecurityGroup okera-ssa-cluster-eksClusterSecurityGroup <nil> [0xbdf1e0]}
    Skipping
    aws:eks/cluster:Cluster &{0xc00011c380 aws:eks/cluster:Cluster okera-ssa-cluster-eksCluster <nil> [0xbdf1e0]}
    Skipping
    aws:ec2/securityGroup:SecurityGroup &{0xc000636d10 aws:ec2/securityGroup:SecurityGroup okera-ssa-cluster-eksClusterSecurityGroup <nil> [0xbdf1e0]}
    Skipping
    aws:iam/role:Role &{0xc000efc0d0 aws:iam/role:Role okera-ssa-eks-cluster-instance-role <nil> [0xbdf1e0]}
    Skipping
    aws:ec2/securityGroup:SecurityGroup &{0xc000636fd0 aws:ec2/securityGroup:SecurityGroup okera-ssa-cluster-nodeSecurityGroup <nil> [0xbdf1e0]}
    Skipping
    aws:iam/role:Role &{0xc000efc340 aws:iam/role:Role okera-ssa-eks-cluster-instance-role <nil> [0xbdf1e0]}
    Skipping
    aws:eks/nodeGroup:NodeGroup &{0xc00148cb40 aws:eks/nodeGroup:NodeGroup okera-ssa-cluster-nodegroup <nil> [0xbdf1e0]}
    Skipping