Suggest only one instance of this module per AWS Account. Lock tables can safely be shared between projects and this makes convention for lock table name more straightforward (default name is terraform-lock)
Specify that the terraform {} block must not be written until after the backend resources are provisioned via the get, init, plan, and apply shown in the setup in the README
I like the idea of doing something magical like this:
Could inspect the environment and be stupid proof.
add example for skipping dynamodb lock table
# This is the infra code for terraform itself (state bucket, lock table, etc.)
module "backend" {
source = "github.com/samstav/terraform-aws-backend"
backend_bucket = "your-terraform-state-bucket"
# this prevents the dynamodb lock table from being created
# which means you'll probably also set `dynamodb_table = false` in your terraform block
dynamodb_lock_table_enabled = 0
}
Updates:
terraform-lock
)terraform {}
block must not be written until after the backend resources are provisioned via theget
,init
,plan
, andapply
shown in the setup in the READMEI like the idea of doing something magical like this:
Could inspect the environment and be stupid proof.
add example for skipping dynamodb lock table