https://pulumi.com logo
#python
Title
g

gorgeous-minister-41131

12/02/2021, 9:55 PM
is there a programatic way to get the current aws provider’s (or any AWS provider’s) current region code? like
use1
or
usw2
?
I think just
pulumi_aws.get_region()
at the most primitive…
r

red-match-15116

12/02/2021, 10:04 PM
The response to get_region... I'm wondering if
region.id
is the short form
g

gorgeous-minister-41131

12/02/2021, 10:08 PM
it’s not, and I am not even sure if this information is available in the API enumeration anyway — even though AWS likes to use them all over their documentation. So it’s probably best to not rely on it and just use the full .name or .id (which ends up being the same value)
I was just hoping for shorter tag values on some of my resources 🙂
r

red-match-15116

12/02/2021, 10:11 PM
yeah fair enough... i hadn't seen those versions of the codes myself
g

gorgeous-minister-41131

12/03/2021, 12:06 AM
they’re mainly used for Availability Zone IDs
must have had a 8.3 limitation for that field in their database 👀
😄 1
3 Views