Last active
April 18, 2022 18:30
-
-
Save caffeinetiger/558e588ad72c6ca80e19e64c2cee8b15 to your computer and use it in GitHub Desktop.
Example of using data resources to get current AWS region and account id
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data "aws_region" "current" {} | |
data "aws_caller_identity" "current" {} | |
locals { | |
aws_region = data.aws_region.current.name | |
aws_account_id = data.aws_caller_identity.current.account_id | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment