From ab649347b06e4b9194ce468e5cdda9e4ce89181e Mon Sep 17 00:00:00 2001 From: aga Date: Fri, 8 May 2026 12:47:24 +0200 Subject: [PATCH 1/2] Ignore Terraform variable files to prevent accidental secret commits --- infra/staging.tfvars | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 infra/staging.tfvars diff --git a/infra/staging.tfvars b/infra/staging.tfvars deleted file mode 100644 index cd265d9..0000000 --- a/infra/staging.tfvars +++ /dev/null @@ -1,2 +0,0 @@ -project_id = "student-progress-staging" -environment = "staging" From 4fbfca0e1768bed9b69d05ef96679d8bb6915cbe Mon Sep 17 00:00:00 2001 From: aga Date: Fri, 8 May 2026 12:48:03 +0200 Subject: [PATCH 2/2] Update Terraform README prerequisites and workflow documentation --- README.md | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 019fb69..00d4f11 100644 --- a/README.md +++ b/README.md @@ -133,7 +133,33 @@ infra/ → Terraform infrastructure configuration Infrastructure is provisioned using Terraform. -**Pre-requisites**: install Terraform. +### Prerequisites + +1. Install [Terraform](https://developer.hashicorp.com/terraform/install) +2. Install TFLint + +```bash +# macOS +brew install tflint +``` + +3. Install TFSec + +```bash +# macOS +brew install tfsec +``` + +### Configuration + +Create environment variable files for each Terraform environment: + +```bash +cp infra/staging.tfvars.example infra/staging.tfvars +cp infra/prod.tfvars.example infra/prod.tfvars +``` + +### Workflow Terraform workflow commands are defined in `infra/Makefile`, including formatting, validation, linting, planning, and applying changes.