This message was deleted.
# typescript
s
This message was deleted.
b
If you look at the docs, you will usually find example usage. In this case use
pulumi.output(aws.ec2.getAmi())
to get the value of Input type
s
I did find that in an example, thanks. I've also seen references to needing to use the
.apply
method and an arrow function in order to access the
.id
property of the Output. Can you provide a high-level explanation of whether this is indeed required and why?
b
mostly Input type is used to reference other resources. In some cases (e.g. when you need JSON / string construction) you may need access to raw value. That is where you will want to use
.apply
https://pulumi.io/reference/programming-model.html#outputs
o
if you need some more examples of apply let us know
s
Yes, some examples of times when you need to use
.apply
would be helpful, thanks!