Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

backends-s3-terraform

Creating terraform backends for remote .tfstate file access using s3 bucket

Please follow these following steps to setup backend tfstate file on remote aws s3-bucket

NOTE: To run this code you must have s3-bucket created first

1- Clone Repo
2- Rename example-terraform.tfvars to terraform.tfvars and update the file.
3- In backend.tf file, terraform block paste your s3-bucket name here.

Commands
terraform init
terraform fmt
terraform validate
terraform apply --auto-approve
NOTE: To migrate the tfstate file again into your local machine comment/delete the terraform (backend) block and just run the following command;
terraform init -migrate-state

About

Creating terraform backends for remote .tfstate file access

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages