gentle-knife-93855
09/04/2022, 3:24 PMapply
, pulumi throws Error: Secret outputs cannot be captured by a closure.
If I use pulumi.interpolate
, the IDE complains that Type 'Output<string>' is not assignable to type 'string | string[] | undefined'.
victorious-church-57397
09/04/2022, 4:55 PMgentle-knife-93855
09/04/2022, 6:33 PMconfig.requireSecret
, the type is Output<String>
and not stringvictorious-church-57397
09/04/2022, 6:34 PMgentle-knife-93855
09/04/2022, 6:36 PMAuthorization
for the API using the got
library. Currently, using a workaround of `config.require()`instead of config.requireSecret
but I would ideally like it be to a forced secret instead of it being an optional onevictorious-church-57397
09/04/2022, 6:37 PM${secret} as string
gentle-knife-93855
09/04/2022, 6:42 PMError: Secret outputs cannot be captured by a closure
My code snippet if that helps -
const nameComUserName = config.requireSecret("name-com-user-name");
const nameComToken = config.requireSecret("name-com-token");
...
"Authorization": `Basic ${Buffer.from(`${nameComUserName}` as string +":"+`${nameComToken}` as string , 'binary').toString('base64')}`
victorious-church-57397
09/04/2022, 6:50 PMgentle-knife-93855
09/04/2022, 7:00 PMbored-oyster-3147
09/04/2022, 10:13 PMgentle-knife-93855
09/05/2022, 3:22 AM