guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

07/14: cdn: Use Terraform's S3 backend.


From: Chris Marusich
Subject: 07/14: cdn: Use Terraform's S3 backend.
Date: Sat, 29 Dec 2018 02:04:55 -0500 (EST)

marusich pushed a commit to branch master
in repository maintenance.

commit 01189233b6ca9ab4104eb39be4eeff2bbec0e7fb
Author: Chris Marusich <address@hidden>
Date:   Fri Dec 28 02:55:50 2018 -0800

    cdn: Use Terraform's S3 backend.
    
    * cdn/terraform/main.tf (terraform): New object, with an s3 backend.
    * cdn/README.org: Update accordingly.
---
 cdn/README.org        |  7 +++----
 cdn/terraform/main.tf | 10 ++++++++++
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/cdn/README.org b/cdn/README.org
index bed9562..e030202 100644
--- a/cdn/README.org
+++ b/cdn/README.org
@@ -859,10 +859,9 @@ So, let's get started!  Let's set up S3 without DynamoDB 
first.
 
 - Back up the state.
 - modify the main.tf file
-- Run "terraform init"
-- Ignore .terraform directory from version control (already done!)
-
-
+- Run "terraform init" and say "yes" when it prompts you if you want
+  to copy existing state into the new backend.
+- Ignore .terraform directory from version control
 
 * Configuration strucure
 There can be multiple files (*.tf, *.tfvars), or just one file.  Name
diff --git a/cdn/terraform/main.tf b/cdn/terraform/main.tf
index 2ea6516..7c1fbdd 100644
--- a/cdn/terraform/main.tf
+++ b/cdn/terraform/main.tf
@@ -1,3 +1,13 @@
+# Backend documentation:
+# https://www.terraform.io/docs/backends/types/s3.html
+terraform {
+  backend "s3" {
+    bucket = "guix-terraform-state"
+    key    = "state"
+    region = "us-west-2"
+  }
+}
+
 # Provider documentation: https://www.terraform.io/docs/providers/aws
 #
 # Some AWS credentials documentation:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]