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 -}