diff --git a/deployment/main.tf b/deployment/main.tf index e69de29..258df7a 100644 --- a/deployment/main.tf +++ b/deployment/main.tf @@ -0,0 +1,21 @@ +terraform { + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 4.16" + } + } + backend "s3" { + bucket = "survey-extractor-terraform-state" + region = "eu-north-1" + profile = "domna.dev" # /home/vscode/aws/credentials + key = "terraform.tfstate" + } + + required_version = ">= 1.2.0" +} + +provider "aws" { + profile = var.profile + region = var.region +} diff --git a/deployment/variables.tf b/deployment/variables.tf index 1535c78..12dee3f 100644 --- a/deployment/variables.tf +++ b/deployment/variables.tf @@ -1,9 +1,11 @@ variable region { type = string - default = "eu-west-2" + default = "eu-north-1" description = "AWS region" } -terraform { - required_version = ">= 0.12" -} +variable "profile" { + description = "AWS profile to use" + type = string + default = "Jun-te" +} \ No newline at end of file