Terraform Region Commandline 1

Terraform Region Commandline

$ export AWS_DEFAULT_REGION=$(aws configure get region --profile default)
$ terraform plan
Refreshing Terraform state in-memory prior to plan...


No changes. Infrastructure is up-to-date.

Here is what the above code is Doing:
1. We’re using the AWS CLI to get the default region from the default profile.
2. We’re setting the AWS_DEFAULT_REGION environment variable to the value we got from the AWS CLI.
3. We’re running terraform plan.

Similar Posts