backend update

This commit is contained in:
Edward Viaene
2018-06-22 08:26:54 +00:00
parent 376dd053c2
commit 426fa5e196
@@ -1,3 +1,14 @@
#!/bin/sh
echo "the next command is not necessary anymore in newer versions of terraform. You should create a backend.tf file"
terraform remote config -backend=s3 -backend-config="bucket=terraform-state-a2b6219" -backend-config="key=terraform/terraform.tfstate" -backend-config="region=eu-west-1"
#!/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"
}
}
'