Channels
welcome
pulumi-cdk
cloudengineering
yaml
blog-posts
localstack
pulumi-ai
package-authoring
general
pulumiup-booth-support
oracle-cloud-infrastructure
learn-pulumi-events
linen
registry
built-with-pulumi
pulumi-cloud
contribex
testingtesting321
hacktoberfest
pulumi-crosscode
content-share
finops
multi-language-hackathon
office-hours
workshops
gitlab
pulumi-kubernetes-operator
jobs
pulumi-deployments
dotnet
aws
golang
announcements
java
pulumiverse
python
install
getting-started
cloudengineering-support
testingtesting123
hackathon-03-19-2020
typescript
google-cloud
contribute
azure
kubernetes
docs
automation-api
status
Powered by
#typescript
Title
c
clever-painter-96148
11/02/2021, 10:23 PM
When using a ComponentResource in TypeScript, how am I supposed to access outputs registered with
https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/pulumi/#ComponentResource-registerOutputs
? I understand that I call registerOutputs() at runtime and that cannot affect the ComponentResource typing. Are the outputs available despite the lack of typing?
b
billowy-army-68599
11/02/2021, 10:25 PM
you need to set them as properties:
https://github.com/pulumi/examples/blob/324ae1d62ef2394ae6260637639a3dc601d9ebc3/aws-ts-stackreference-architecture/application/src/application.ts#L50
c
clever-painter-96148
11/02/2021, 10:29 PM
Thanks! That's actually what I am doing. So what's the purpose of registerOutputs then?
Here it is not even called:
https://github.com/pulumi/pulumi-awsx/blob/master/nodejs/awsx/ec2/vpc.ts#L265
and here, it is called without any value:
https://github.com/pulumi/pulumi-awsx/blob/master/nodejs/awsx/ec2/subnet.ts#L84
Okay, I'm not alone:
https://github.com/pulumi/pulumi/issues/2653
😅
Post