https://pulumi.com logo
Title
b

bland-pharmacist-96854

02/10/2023, 10:38 AM
Am I trying to do something that is not possible?
e

echoing-dinner-19531

02/10/2023, 10:41 AM
https://www.pulumi.com/docs/intro/concepts/resources/options/transformations/ You probably want to check
args.type
is a type that can have tags, and you need to manually merge the existing properties with the new ones, the transform doesn't do that automatically.
b

bland-pharmacist-96854

02/10/2023, 10:42 AM
e

echoing-dinner-19531

02/10/2023, 10:43 AM
b

bland-pharmacist-96854

02/10/2023, 10:44 AM
then, is it need to maintain that taggableresourcetypes array?
e

echoing-dinner-19531

02/10/2023, 10:45 AM
yeh I don't think there's any way to work that automatically at the moment
maybe something could be done with the type schemas and reflection but not something we've looked into
b

bland-pharmacist-96854

02/10/2023, 10:45 AM
what if I'm sure that all resources that I'm using supports tags? I can skip that if taggable, right?
e

echoing-dinner-19531

02/10/2023, 10:46 AM
Yeh probably
b

bland-pharmacist-96854

02/10/2023, 10:57 AM
works well, I ended doing this
const notTaggable = [
  "aws:iam/rolePolicyAttachment:RolePolicyAttachment",
  "aws:ec2/securityGroupRule:SecurityGroupRule",
  "aws:ec2/routeTableAssociation:RouteTableAssociation",
];
:)
easier than maintain a list of taggable items