This message was deleted.
# general
s
This message was deleted.
d
Yes, this is their intended use
g
Another option (my preferred) is to do lookups instead. eg. calling
get_<resource>
functions with the parameters known from the library. This way you can have constant eg.
AWS_ROLE_NAME=myRole
and then you can
Copy code
const role = aws.iam.getRole(AWS_ROLE_NAME) 
role.arn
The benefit of this approach is sharing more complex objects is easier. Also prevents outdated stack references
d
Combining the two methods is a common approach. Passing the ID or Name using a stack reference, then using functions or the
.get
method to load the rest of the data for the stack to use
g
be careful about using
<Resource>.get
method it is very different from
get_<resource>
and can lead to side effects
d
What side effects have you encountered?