Skip to content

A Terraform module for creating/managing resources for your Terraform AWS Backend

License

Notifications You must be signed in to change notification settings

shelleg/terraform-aws-backend

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

terraform-aws-backend

terraform backend resources managed by terraform.

Bootstrap your project whose resources will be managed by terraform:

module "backend" {
  source = "github.com/samstav/terraform-aws-backend"
  backend_bucket = "terraform-state-bucket" 
}

The following commands will get you up and running:

terraform get -update
# Avoid backend configuration on our first call to init since we havent created our resources yet
terraform init -backend=false
# Target only the resources needed for our aws backend for terraform state/locking
terraform plan -out=backend.plan -target=module.backend
terraform apply backend.plan
# *now* we can write the terraform backend configuration into our project
echo 'terraform { backend "s3" {} }' > conf.tf
# re-initialize and you're good to go
terraform init -reconfigure -backend-config=conf.tfvars

About

A Terraform module for creating/managing resources for your Terraform AWS Backend

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HCL 100.0%