sparse-intern-71089
05/17/2022, 7:08 PMbroad-island-71889
05/17/2022, 7:09 PM# registerAutoTags registers a global stack transformation that merges a set
# of tags with whatever was also explicitly added to the resource definition.
def register_auto_tags(auto_tags):
pulumi.runtime.register_stack_transformation(lambda args: auto_tag(args, auto_tags))
# auto_tag applies the given tags to the resource properties if applicable.
def auto_tag(args, auto_tags):
if is_taggable(args.type_):
args.props["tags"] = {**auto_tags, **(args.props["tags"] or {})}
return pulumi.ResourceTransformationResult(args.props, args.opts)
white-balloon-205
id
property set only in the case of read. If so you may be able to use that to decide whether to apply the transformation?No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by