I am having an issue using an output as an input o...
# typescript
e
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
Copy code
resources: {[`com.cloudflare.api.account.zone.${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!
v
Have you tried using the
interpolate
function from pulumi?
e
I have.
For the meantime, I have aborted trying to create API keys programatically and moved on.