sparse-intern-71089
01/13/2023, 3:32 PMechoing-dinner-19531
01/14/2023, 10:33 PMwhite-author-39785
01/16/2023, 8:52 AMechoing-dinner-19531
01/16/2023, 9:14 AMDoes that mean, I can use a dynamic resource provider to create only a single instance of a resource?No. One provider instance can handle multiple resource instances. Have you read the various docs we have on dynamic providers? Might help: https://www.pulumi.com/docs/intro/concepts/resources/dynamic-providers/ https://www.pulumi.com/blog/dynamic-providers/ https://github.com/pulumi/examples/tree/master/aws-py-dynamicresource
white-author-39785
01/16/2023, 9:45 AMwhite-author-39785
01/16/2023, 9:46 AMechoing-dinner-19531
01/16/2023, 12:27 PMHowever, only one file is created and everything is written there (as if only the last of theSo if that's in the provider "create" call then it will get called multiple times (once for each instance that's created) but the behaviour for getLogger() is to always return the same root logger instance. So that's why your only seeing one file.instances is really created. This is extremely confusing.logging.getLogger()
white-author-39785
01/16/2023, 4:08 PM409
problems were caused by something only existing once that I thought was existing mutliple times: I initialized an ID as uuid.uuid4()
as the default of a function parameter. This is a bad idea as such a code only gets executed once, when defining the function and not each time the function is called.
The logging problems were caused by the fact that the logging.basicConfig
is somehow global.