thousands-knife-3009
02/28/2024, 6:50 PMadventurous-butcher-54166
02/29/2024, 9:41 AM.result
directly without .apply(lambda v: f"prefix{v}suffix")
- you are basically trying to concat the value with "prefix" + result + "suffix" when the result value isn't yet known.
https://gist.github.com/jeffclay/df65ae2d32e19bcca0d363c8f81b0231#file-component-py-L55
Using outputs in resource_names can be problematic when outputs aren't yet known – and thus pulumi wouldn't know what logical name to use for the resource (see issue #5234). And I'm not sure you can access name here as you're passing in the .result
property and not the RandomPassword
instance.
https://gist.github.com/jeffclay/df65ae2d32e19bcca0d363c8f81b0231#file-component-py-L123
https://gist.github.com/jeffclay/df65ae2d32e19bcca0d363c8f81b0231#file-component-py-L159
Although I haven't used pulumi-gcp or pulumi-gitlab, you can in most cases pass in unknown outputs as input parameters and Pulumi will take care of that once the value is known. Or if you still get warnings just append .apply(lambda v: v)
In this particular case you don't have to do any string mangling to compose the bucket url as that is one of the outputs from Bucket so you can simply do value=self.gcp_bucket.url
https://gist.github.com/jeffclay/df65ae2d32e19bcca0d363c8f81b0231#file-component-py-L77No 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