Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ jobs:
- name: Validate
run: |
cd infrastructure
mv backend.production.tf backend.tf && rm backend.staging.tf
terraform init
terraform init -backend-config="bucket=recon-magic-framework-backend"
terraform validate
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand Down Expand Up @@ -117,8 +116,7 @@ jobs:
- name: Deploy
run: |
cd infrastructure
mv backend.production.tf backend.tf && rm backend.staging.tf
terraform init
terraform init -backend-config="bucket=recon-magic-framework-backend"
terraform apply -auto-approve
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand Down
7 changes: 0 additions & 7 deletions infrastructure/backend.production.tf

This file was deleted.

7 changes: 0 additions & 7 deletions infrastructure/backend.staging.tf

This file was deleted.

8 changes: 8 additions & 0 deletions infrastructure/backend.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
terraform {
backend "s3" {
# Backend configuration will be provided via -backend-config flags
# during terraform init to support multiple environments
key = "terraform.tfstate"
region = "us-east-1"
}
}