https://pulumi.com logo
#general
Title
# general
f

full-dress-10026

05/29/2019, 8:17 PM
I'm creating a
pulumi.ComponentResource
which internally creates some
aws.cloudformation.Stack
. I would like to expose some outputs of the CF Stacks as outputs of my
ComponentResource
. I tried doing this in my ComponentResource ctor:
Copy code
this.computeGroupName = computeStack.outputs.apply(outputs => outputs["CodeDeployDeploymentGroup"]);
Typescript complains that
Type 'Output<any>' is not assignable to type 'Output<string>'.
. I'm guessing this is because a CF Stack does not cast the values from its
.outputs
to any type.
this.computeGroupName
is defined as
computeGroupName: pulumi.Output<string>;
. Is there a way to make TypeScript happy?
t

tall-librarian-49374

05/29/2019, 8:20 PM
this.computeGroupName = computeStack.outputs.apply(outputs => <string>outputs["CodeDeployDeploymentGroup"]);
should satisfy the compiler
f

full-dress-10026

05/29/2019, 8:21 PM
Yep, thanks!