The following command allows to use the Terraform command line via Docker:
docker run --rm -it --name terraform -v ~/:/root/ -v $(pwd):/workspace -w /workspace hashicorp/terraform:lightFor simplified use, you can create an alias:
alias terraform='docker run --rm -it --name terraform -v ~/:/root/ -v $(pwd):/workspace -w /workspace hashicorp/terraform:light'Using this alias, there is no longer any difference between a terraform command executed via Docker or via Terraform CLI.
terraform fmtterraform validateterraform loginterraform initPlan a run to check differences between the current and the next infrastructure state to be deployed
terraform planterraform apply- Must be up-to-date with main (rebased, linear history)
- Must be prefixed with follow the
build/,chore/,ci/,docs/,feat/,fix/,perf/,refactor/,revert/,style/ortest/according to their content. See Conventional Commits cheat sheet
Must follow conventional commits specification: Commits Conventionnels
Commits must be verified: About commit signature verification
All validation checks in workflow Validate Terraform must pass without failure
- Terraform is an infrastructure as code software tool that allow to define and provide infrastructure using a declarative configuration language
- terraform provider: is a Terraform provider used to read and write to/from Terrafrom Cloud (workspaces, variables, etc.)