File tree Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -51,10 +51,8 @@ function init_terraform() {
5151 # shellcheck disable=SC2086,SC2046
5252 $DOCKER_TERRAFORM init \
5353 -input=" $INPUT_ENABLED " \
54- -backend-config bucket=tf-state.${PROJECT_NAME} .${AWS_DEFAULT_REGION} .$( get_aws_account_id) \
55- -backend-config dynamodb_table=TerraformStatelock-${PROJECT_NAME} \
56- -backend-config region=${AWS_DEFAULT_REGION} \
57- -backend-config encrypt=true
54+ -backend-config region=${AWS_DEFAULT_REGION}
55+
5856 # Generate an SSH keypair if none exists yet
5957 if [[ ! -f ~ /.ssh/id_rsa.pub ]]; then
6058 # shellcheck disable=SC2174
Original file line number Diff line number Diff line change @@ -4,10 +4,10 @@ terraform {
44 # ./bootstrap project. See ./bootstrap/README.md for details.
55 # ===================================================================
66 backend "s3" {
7- bucket = " moduscreate-devops-demo -tf-state-us-east-1"
7+ bucket = " ${ var . backend_account_alias } -tf-state-us-east-1"
88 key = " terraform-state.tfstate"
9- dynamodb_table = " moduscreate-devops-demo -state-lock"
10- region = " us-east-1 "
9+ dynamodb_table = " ${ var . backend_account_alias } -state-lock"
10+ region = " ${ var . aws_region } "
1111 encrypt = " true"
1212 }
1313}
Original file line number Diff line number Diff line change @@ -111,3 +111,8 @@ variable "newrelic_alert_email" {
111111 description = " New Relic alert email"
112112 default = " "
113113}
114+
115+ variable "backend_account_alias" {
116+ description = " Account alias, or prefix, used by bootstrap project"
117+ default = " moduscreate-devops-demo"
118+ }
You can’t perform that action at this time.
0 commit comments