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
salmon-account-74572
05/10/2019, 9:25 PM
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
best-gigabyte-81826
05/10/2019, 9:44 PM
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
No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.