[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:
- branch master updated (777e9e1 -> 5b68c2f), Chris Marusich, 2018/12/29
- 14/14: cdn: Add an example command to the README.org., Chris Marusich, 2018/12/29
- 11/14: cdn: Provision a TLS certificate for ci.guix.info., Chris Marusich, 2018/12/29
- 07/14: cdn: Use Terraform's S3 backend.,
Chris Marusich <=
- 13/14: cdn: Add billing alarms., Chris Marusich, 2018/12/29
- 10/14: cdn: Switch default region to us-east-1., Chris Marusich, 2018/12/29
- 08/14: cdn: Add a lifecycle policy to the state bucket., Chris Marusich, 2018/12/29
- 06/14: cdn: Add an S3 bucket to hold Terraform state., Chris Marusich, 2018/12/29
- 12/14: cdn: Allow clients to use both HTTP and HTTPS., Chris Marusich, 2018/12/29
- 04/14: cdn: Do not hard-code the profile name., Chris Marusich, 2018/12/29
- 02/14: cdn: Give Ludo and Ricardo administrative access., Chris Marusich, 2018/12/29
- 05/14: cdn: Add a CloudFront distribution fronting berlin., Chris Marusich, 2018/12/29
- 03/14: cdn: Add thoughts about next steps to README., Chris Marusich, 2018/12/29
- 01/14: cdn: Initial commit of Terraform configuration., Chris Marusich, 2018/12/29