What Changed
Add CI workflow on pull request that runs:
tofu fmt: check if .tfcode is formatted.tofu validate: check if the.tfcode is valid.tflint: performs static analysis to detect potential issues and enforce best practices.terragrunt-hclfmt: check if the.hclTerragrunt configuration files are well formated.tfsec: scans Terraform code for security vulnerabilities.- Generates the
terragrunt stackand runsterragrunt plan. - Fail if the label
run-terratestis present on the PR. Otherwise, continue. (*) terratest: apply the terraform modules and terragrunt stacks and tests if it matches the expected outcome.
(*) This strategy is used to avoid running terratest on every new commit pushed on the PR to prevent costs of repeatedly building the infrastructure.