From 69056bf275d6f7475c39b65e9a9dfea15599674e Mon Sep 17 00:00:00 2001 From: Chris Wright Date: Mon, 6 Nov 2023 09:34:02 +0000 Subject: [PATCH] Add S3 backend * Adds minimal config to use an S3 backend * Ammends the github workflow to remove the backend configuration so that the terraform checks can run without providing backend configuration --- .github/workflows/continuous-integration-terraform.yml | 3 +++ backend.tf | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 backend.tf diff --git a/.github/workflows/continuous-integration-terraform.yml b/.github/workflows/continuous-integration-terraform.yml index fd6d836..b920504 100644 --- a/.github/workflows/continuous-integration-terraform.yml +++ b/.github/workflows/continuous-integration-terraform.yml @@ -22,6 +22,9 @@ jobs: DOTFILE_VERSION=$(cat .terraform-version) echo "version=$DOTFILE_VERSION" >> $GITHUB_OUTPUT + - name: Remove AWS backend + run: rm ./backend.tf + - name: Pull Terraform image run: | docker pull hashicorp/terraform:${{ steps.get-terraform-version.outputs.version }} diff --git a/backend.tf b/backend.tf new file mode 100644 index 0000000..12c0dbe --- /dev/null +++ b/backend.tf @@ -0,0 +1,3 @@ +terraform { + backend "s3" {} +}