Hi there, I’m using pulumi to deploy some aws res...
# general
Hi there, I’m using pulumi to deploy some aws resources. And I need to get the arn of one resource and then inform it as an input in the other one. How can I do it?
Every resource will have an ID output, but I think you have to manually construct the ARN from that ID. Honestly this feels like a good suggestion to make to https://github.com/pulumi/pulumi-aws-native/issues to output these for ease of use.
I really appreciate your answer. So, in this case, how should I proceed? Do you have an example?
I got to do it here. As a example I did: self.arn = bucket.arn.apply(lambda arn: arn) However, when I try to use it, it says I can’t convert output to string. Do you know how to handle it?
apply will always return an Output type, but something like
bucket.id.apply(lambda id: "arn:aws:s3:us-east-2:12345:bucket:" + id)
The region and account id obv need changing to match what your using.
It worked out here
I’m now in another object
Thanks for your help