|
@@ -1,14 +1,14 @@
|
|
|
locals {
|
|
|
- backend_tf_dynamo = <<EOF
|
|
|
+ backend_tf_dynamo = local.dynamodb_support != true ? "" : <<EOF
|
|
|
For your project(s), use a backend.tf containing the following:
|
|
|
|
|
|
terraform {
|
|
|
backend "s3" {
|
|
|
bucket = "${aws_s3_bucket.state_storage.id}"
|
|
|
key = SOMETHING UNIQUE PER PROJECT
|
|
|
- region = "us-east-1"
|
|
|
+ region = "${local.region}"
|
|
|
encrypt = true
|
|
|
- dynamodb_table = aws_dynamodb_table.lock_table.id
|
|
|
+ dynamodb_table = "${aws_dynamodb_table.lock_table[0].id}"
|
|
|
profile = "${local.profile}"
|
|
|
}
|
|
|
}
|
|
@@ -20,7 +20,7 @@ terraform {
|
|
|
backend "s3" {
|
|
|
bucket = "${aws_s3_bucket.state_storage.id}"
|
|
|
key = SOMETHING UNIQUE PER PROJECT
|
|
|
- region = "us-east-1"
|
|
|
+ region = "${local.region}"
|
|
|
encrypt = true
|
|
|
profile = "${local.profile}"
|
|
|
}
|