This message was deleted.
# aws
s
This message was deleted.
l
Not as far as I'm aware. There is no attribute that says a resource can or cannot have tags.
Though I suppose you could use introspection, since all the taggable resources have a
tags
property (at least in AWS). You'd need to be aware of the
tagsAll
property that some resources also have.
g
hmm good point about
tagsAll
- do you have any example of such a resource? I wonder if it could have both arguments then?
l
I think
tagsAll
is supposed to be a combination of
tags
and any tags that AWS gives the resource... I did come across a few resources with it, I'll have a quick hunt around for some.
VPCs and Directories both have tagsAll.
Copy code
/**
     * A map of tags assigned to the resource, including those inherited from the provider .
     */
    readonly tagsAll: pulumi.Output<{
        [key: string]: string;
    }>;
g
I'm quite confused from the description on what is the difference between
tags
and
tagsAll
`tagsAll`:
A map of tags assigned to the resource, including those inherited from the provider .
`tags`:
A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
I wonder what happens to
tagsAll
if they partially match
default_tags
from provider
p
If you'd be interested in AWS with Python, check out https://github.com/tlinhart/pulumi-aws-tags It uses the
inspect
module to get the taggable resources.
g
thanks @proud-art-41399 it looks great!
128 Views