Files
terraform-course/docker-demo-3/scripts/configure-remote-state.sh
T
Edward Viaene 426fa5e196 backend update
2018-06-22 08:26:54 +00:00

15 lines
484 B
Bash
Executable File

#!/bin/bash
echo "Newer terraform versions have a new way of defining a backend. Copy paste the following code in a backend.tf file, modify the region/s3 bucket, and execute 'terraform init' to initialize the backend. You'll be asked to copy the data from the local backend to the s3 backend, which you can answer yes.
"
echo 'backend.tf
==========
terraform {
backend "s3" {
bucket = "terraform-state-a3c731f"
key = "terraform.tfstate"
region = "eu-west-1"
}
}
'