Open vadimAnte opened 5 years ago
@vadimAnte I think I like this idea, thanks for the suggestion!
I have three questions.
1) Should the region variable have a default, or just be blank?
2) In the case of "no default", what happens when the variable is unset/blank?
3) Would it not be "better" to encourage users to use the AWS_DEFAULT_REGION
variable before plan/apply?
› terraform apply backend.plan
Error: Missing required argument
The argument "region" is required, but was not set.
@samstav
i think you should allow this as a config option in the backend module.
module "backend" {
source = "github.com/samstav/terraform-aws-backend"
backend_bucket = "somebucket"
region = "${var.region}"
}
following the steps in the README.md
, the module asked me for a region when i ran the plan command terraform plan -out=backend.plan -target=module.backend
. after I chose us-east-1
, the error above returned. if there's no default set and the user does not set one, allow it to exit 0.
yes, i will set and try again using AWS_DEFAULT_REGION
.
Thanks @cbfx.
So, expose the region
variable but default it to blank?
Hello,
Please add AWS region to variables. Imagine that you are deploying an many AWS regions, but prefer keep all back-end files in one region only.