icy-jordan-58549
06/08/2021, 11:25 AMconst config = await authorization.getClientConfig();
const token = await authorization.getClientToken();
Getting:
creating error: Program run without the Pulumi engine available; re-run using the `pulumi` CLI
bored-oyster-3147
06/08/2021, 12:50 PMicy-jordan-58549
06/08/2021, 2:15 PMbored-oyster-3147
06/08/2021, 2:39 PMlemon-agent-27707
06/08/2021, 3:07 PMicy-jordan-58549
06/09/2021, 9:54 AMlet clientID = azure.config.clientId;
let clientSecret = azure.config.clientSecret;
let tenantID = azure.config.tenantId;
let subscriptionID = azure.config.subscriptionId;
const config = await authorization.getClientConfig();
const token = await authorization.getClientToken();
bored-oyster-3147
06/09/2021, 12:37 PMawait
inside a pulumi program. Automation API can do this but you'll see weird behavior doing that using the CLI with a local program I think. What is authorization
in this context?icy-jordan-58549
06/09/2021, 2:35 PMbored-oyster-3147
06/09/2021, 3:29 PMgetAuthorizationManagementClient
and getRoleIdByName
each contain a couple `await`s. But it's important to note that when the pulumi program executes them, it does so by piping the resulting Promise
to a pulumi.output(...)
call here. So the pulumi program is dealing with asynchronous actions only through Output<T>
and is not awaiting the Promise
explicitly.Promise<T>
to a Pulumi.Resource
directly because Promise<T>
can be implicitly cast to Input<T>
, again, not being awaited explicitlyicy-jordan-58549
06/10/2021, 7:21 AM