04/26/2023, 2:02 PM
I am having an issue using an output as an input on a particular line of code with the Cloudflare provider. I believe the issue here is just the tricky syntax chosen by the Cloudflare provider for this resource definition. Here is the line
resources: {[`${accountId}`]: "*"},
If the accountId is in my Pulumi configuration, it works fine. If it is an output that I have grabbed from a get function or an output from another stack, it does not work. I get the famous 'Calling [toString] on an [Output<T>] is not supported'. The same accountId works fine for all my other resources where I use it many other places throughout the script. It just does not work for this particular line of code. I have tried many different combinations of apply, then and pulumi.interpolate and cannot get it to work. Any thoughts? Thanks in advance!


04/26/2023, 4:42 PM
Have you tried using the
function from pulumi?


04/26/2023, 6:11 PM
I have.
For the meantime, I have aborted trying to create API keys programatically and moved on.