This message was deleted.
# general
s
This message was deleted.
b
@stale-vase-87890 you should creat the value you pass to secretString in an
apply
. It would look something like:
Copy code
appsecrets.auth0clientid.apply(v => JSON.stringify({auth0clientid1: v}))
and then use the return of that (which will be Output<T>) to pass to
secrestString
.
Apologies for the pseudo-code - I mostly do this in Go πŸ™‚
s
thanks! i will give a try
b
But basically, you need to create an output which contains your fully resolved JSON blob, which itself is done in an apply.
s
Hey it worked! I am going to have a few secrets values that have several keys, but I think I can combine all that with pulumi.all
b
Right, exctly.
You got it πŸ™‚
s
thanks so much!!!
const auth0client = pulumi.all([appsecrets.auth0clientid, appsecrets.auth0]).apply(([clientid, auth]) => JSON.stringify({auth0clientid1: clientid, authclient:auth}))
It is ugly but it works now to add helpful comments so I remember what this does a week from now πŸ˜†
b
My guess is there are some utility functions already in place to make this better, but I just don’t know the TypeScript side.
e
you could probably use the output function which will try to unwrap nested Output values so you just have one Output type at the top level. I think something like:
output({auth0lientid1: appsecrets.auth0clientid, authclient:appsecrets.auth0}).apply(JSON.stringify)
πŸ™Œ 1