From 92733f661371c27343bc6199438e74a23fc2fa88 Mon Sep 17 00:00:00 2001 From: shockrah Date: Mon, 13 Jun 2022 23:08:02 -0700 Subject: [PATCH] * Moving to a remote backend in s3 --- infra/backend.tf | 24 ++++++++++++++++++++++++ infra/provider.tf | 7 ------- 2 files changed, 24 insertions(+), 7 deletions(-) create mode 100644 infra/backend.tf delete mode 100644 infra/provider.tf diff --git a/infra/backend.tf b/infra/backend.tf new file mode 100644 index 0000000..3564cd9 --- /dev/null +++ b/infra/backend.tf @@ -0,0 +1,24 @@ +terraform { + required_version = ">= 0.13" + backend "s3" { + bucket = "project-athens" + key = "infra/state/build.tfstate" + region = "us-west-1" + encrypt = true + } + required_providers { + aws = { + source = "hashicorp/aws" + version = "4.13.0" + } + } +} + +# Base config for using AWS features w/ Terraform +provider "aws" { + access_key = var.aws_key + secret_key = var.aws_secret + region = var.aws_region + max_retries = 1 +} + diff --git a/infra/provider.tf b/infra/provider.tf deleted file mode 100644 index ac07ecb..0000000 --- a/infra/provider.tf +++ /dev/null @@ -1,7 +0,0 @@ - -provider "aws" { - access_key = var.aws_key - secret_key = var.aws_secret - region = var.aws_region - max_retries = 1 -}