full-dress-10026
06/06/2019, 11:00 PMcreate
method of my pulumi.dynamic.ResourceProvider
, I have some Pulumi `Output`s that I want to wait for before marking my resource as created. How would I wait for the Outputs to materialize?await
`pulumi.Input`s?Type 'Promise<Output<{ id: string; outs: string; }>>' is not assignable to type 'Promise<CreateResult>'.
create
method.white-balloon-205
.get
on your Outputs inside dynamic providers, since they will be run in a separate process.
If you have not yet seen this - it’s worth a read - it doesn’t exactly answer this question, but does provide some background to understand why this is true: https://pulumi.io/reference/programming-model/#dynamicprovidersfull-dress-10026
06/06/2019, 11:24 PMerror: Plan apply failed: Cannot call '.get' during update or preview.
To manipulate the value of this Output, use '.apply' instead.
async create(args: DatomicIonsArgs) {
const configUri = pulumi.output(args.configUri).get();
const cliResult = await deployIons({
projectDirectory: args.projectDirectory,
configUri: configUri
}, this);
console.log(cliResult);
if (cliResult) {
return {id: "", outs: ""};
} else {
throw new Error("Ion deployment failed.");
}
}
inputs.left
and inputs.right
off of inputs
in the create method. I believe those are actually going to be Input<number>
not number
. Unless Pulumi is unwrapping things behind the scenes...any
.inputs
to the provider methods?white-balloon-205
create
method, so you should not in general have to deal with outputs here. In particular arts.configUri
will be a plain JavaScript object already.full-dress-10026
06/07/2019, 12:47 AM