In Terraform there is a `data` type that I can use...
# general
f
In Terraform there is a
data
type that I can use to refer to and verify external ( unmanaged ) resources Is there an equivalent in Pulumi?
g
There is. Generally, this would be accomplished with a SDK such as the AWS SDK for node/go/python/csharp. You'd import that SDK into your Pulumi project and are free to use the full scope.
l
All the resources have a
get
function that creates a read-only, unmanaged version of the resource.
And there are SDK wrappers in most modules.
For example, the AWS EC2 module has GetAmi, GetNetworkInterfaces, GetRoute, etc. https://www.pulumi.com/registry/packages/aws/api-docs/ec2/ (scroll half-way down the page).
g
Yep, that's also a great solution. Generally, the more complex the lookup, the more likely you'll need to use an external SDK. Eg- if you have the AWS ARN/ID of the resource use the
get
functions.
f
❤️ thanks!