bland-pharmacist-96854
09/03/2024, 4:37 PMpulumi.runtime.registerResourceTransform((args) => {
if (args.props['tags']) {
args.props['tags'] = { ...args.props['tags'], test: 'test' }
}
return { props: args.props, opts: args.opts }
})
The Pulumi runtime detected that 4640 promises were still active
at the time that the process exited. There are a few ways that this can occur:
* Not using `await` or `.then` on a Promise returned from a Pulumi API
* Introducing a cyclic dependency between two Pulumi Resources
* A bug in the Pulumi Runtime
Leaving promises active is probably not what you want. If you are unsure about
why you are seeing this message, re-run your program with the `PULUMI_DEBUG_PROMISE_LEAKS`
environment variable. The Pulumi runtime will then print out additional
debug information about the leaked promises.
little-cartoon-10569
09/03/2024, 8:42 PMbland-pharmacist-96854
09/04/2024, 7:17 AMmillions-journalist-34868
09/10/2024, 8:56 PMlittle-cartoon-10569
09/10/2024, 9:10 PMregisterStackTransformation
? I can't see registerStackTransform
in the docs.millions-journalist-34868
09/10/2024, 9:11 PMlittle-cartoon-10569
09/10/2024, 9:12 PMlittle-cartoon-10569
09/10/2024, 9:16 PMlittle-cartoon-10569
09/10/2024, 9:17 PMmillions-journalist-34868
09/10/2024, 9:36 PMlittle-cartoon-10569
09/10/2024, 9:47 PMmillions-journalist-34868
09/10/2024, 9:49 PMconst resourceGroup = new azureNative.resources.ResourceGroup("rg-transforms", {
location: "WestUS",
});
// Apply a tag with the stack name to all resources
pulumi.runtime.registerStackTransformation((args) => {
args.props['tags'] = { ...args.props['tags'], test: 'test' }
return { props: args.props, opts: args.opts };
});
little-cartoon-10569
09/10/2024, 9:54 PMlittle-cartoon-10569
09/10/2024, 9:57 PMif (isTaggable(...) {
args.props.tags = /* stuff */;
return { props: args.props, opts: args.opts ];
}
return undefined;
The two substantive differences are that I'm mutating args
itself (probably not important), and I'm returning undefined
for resources that don't support the tags prop.millions-journalist-34868
09/10/2024, 10:03 PMlittle-cartoon-10569
09/10/2024, 10:05 PMmillions-journalist-34868
09/10/2024, 10:07 PMmillions-journalist-34868
09/10/2024, 10:51 PMpulumi.runtime.registerStackTransformation((args) => {
if (args.type == "azure-native:resources:ResourceGroup") {
args.props.tags = { test: 'test' }
return { props: args.props, opts: args.opts };
}
return undefined;
});