icy-chef-34317
07/30/2024, 9:36 PMdef transformation(args: ResourceTransformationArgs):
new_props = args.props
new_props["tags"] = {"blah1": "blah2"}
return ResourceTransformationResult(props=new_props, opts=args.opts)
pulumi.runtime.stack.register_stack_transformation(transformation)
The issue here is that pulumi throws this error
Diagnostics:
github:index:RepositoryEnvironment (repo-env):
error: github:index/repositoryEnvironment:RepositoryEnvironment resource 'repo-env' has a problem: Invalid or unknown key. Examine values at 'repo-env.tags'.
during the creation of a simple GitHub repository environment (code below):
repo_env=github.RepositoryEnvironment(
resource_name="repo-env",
environment="dev",
repository=ams_repo.name,
can_admins_bypass=True,
)
If I remove the stack transformation, the deployment goes on normally.
Any idea on what I am doing wrong? Google is not helping and the less I have to say about Pulumi "AI" the better.
Thanks in advance.dry-keyboard-94795
07/30/2024, 9:55 PMicy-chef-34317
07/30/2024, 9:57 PMicy-chef-34317
07/30/2024, 9:58 PMdry-keyboard-94795
07/30/2024, 10:10 PMargs.type_
dry-keyboard-94795
07/30/2024, 10:11 PMicy-chef-34317
07/30/2024, 10:11 PMicy-chef-34317
07/30/2024, 10:14 PMicy-chef-34317
07/30/2024, 10:14 PMdry-keyboard-94795
07/30/2024, 10:21 PMtags
, so you should be able to do if not args.type_.startswith("github:")
icy-chef-34317
07/30/2024, 10:23 PM