sparse-intern-71089
09/16/2020, 6:34 PMgentle-diamond-70147
09/16/2020, 7:10 PMconfig.json
a file you want to write to? Or something else?
If it's a file you want to write values to, you need to do the write from within an apply
. Here's an example in Go - https://gist.github.com/clstokes/7d065009cd048388cd981d37db2c5f48#file-main-go-L37-L67.millions-furniture-75402
09/16/2020, 7:19 PMexport const configContent = pulumi.all([cognitoUserPoolClientId, reportsAuthDomain, reportsDomainUrl, cognitoUserPoolId, apiUrl])
.apply(([userPoolClientId, authDomain, domainUrl, userPoolId, url]) => {
fs.writeFileSync("./src/scripts/config.json", `{
"authData": {
"ClientId": "${userPoolClientId}",
"AppWebDomain": "${authDomain}",
"IdentityProvider": "COGNITO",
"TokenScopesArray": ["email", "openid"],
"RedirectUriSignIn": "${domainUrl}/dashboard.html",
"RedirectUriSignOut": "${domainUrl}/",
"UserPoolId": "${userPoolId}"
},
"apiUrl": "${url}"
}`);
millions-furniture-75402
09/16/2020, 7:20 PMmillions-furniture-75402
09/16/2020, 7:29 PM