This message was deleted.
# python
s
This message was deleted.
r
nvm. Just read https://www.pulumi.com/docs/intro/concepts/config/ and realized how this config thing works. You need to create a separate
pulumi.Config()
for
aws:region
f
You can use
pulumi_aws
also:
Copy code
# Set Region
aws_region = str(pulumi_aws.get_region().name)
r
I don't believe you can use
pulumi_aws.get_region()
as an input to another resource. But now I see that there's also
.get_region_output
as well, which may work for what I need the region string for. I'm afk right now, but will definitely try this when i get back
f
I can confirm it works, I’m using the line above in my project
r
thank you! I appreciate it. I just tried it myself, and am able to as well, with just
pulumi_aws.get_region().name
. The crucial bit that was missing for me was the
.name
🤦‍♂️ It looks from https://www.pulumi.com/registry/packages/aws/api-docs/getregion/ that
.name
is already a `str`; you shouldnt need to
str(...)
it