damp-room-71337
09/13/2019, 2:37 PMdynamic.Resource
properties - how do I return info from the backing cloud object via the Resource object here?
const TestProvider = {
async create(inputs) {
// some api call result
const derivedVal = "foobar";
return {
id: "id",
outs: { inputVal: inputs.inputVal, derivedVal: derivedVal
}
};
}
};
class TestResource extends pulumi.dynamic.Resource {
constructor(name, props, opts) {
super(TestProvider, name, props, opts);
}
}
const testResource = new TestResource("test-token", {
inputVal: "bar"
});
console.log(testResource.inputVal); // 'OutputImpl { ...'
console.log(testResource.derivedVal); // undefined
gentle-diamond-70147
09/13/2019, 3:33 PM