Configuration

Learn how to configure environments, customize the project structure, set up linting and code analysis, and understand the CI/CD workflow.


Overview

The Configuration section covers how to structure your Terraform project, manage multiple environments, configure code quality tools, and understand the automated CI/CD pipeline.

Topics

  • Project Structure — understand the repository layout, directory organization, and key files
  • Environments — manage environments with isolated state and independent deployments
  • CI/CD Workflows — understand how GitHub Actions validates and deploys your infrastructure
  • Linting and Code Analysis — configure TFLint and Checkov to enforce code quality and security standards

Key concepts

Environment isolation

Each environment maintains:

  • Separate Terraform state files in S3
  • Independent backend configurations
  • Environment-specific variables with defaults
  • Dedicated GitHub Actions workflows

Backend management

The starter kit uses:

  • S3 for remote state storage with versioning and encryption
  • S3 native state locking (Terraform 1.10+) to prevent concurrent modifications
  • Unique state keys per environment for complete isolation

Automated workflows

GitHub Actions workflows provide:

  • Code quality checks with TFLint
  • Security scanning with Checkov
  • Plan generation posted as PR comments
  • Automated deployments on merge to main

For detailed information on each topic, explore the Configuration subsections.