Terraform
Terraform is an open-source infrastructure as code software tool that provides a consistent CLI workflow cloud services
https://learn.hashicorp.com/terraform
Terraform CLI
To install terraform
CLI : https://learn.hashicorp.com/tutorials/terraform/install-cli?in=terraform/docker-get-started
The main workflow consists of 3 steps once you have written your Terraform configuration :
- Initialize : prepares the working directory so Terraform can run the configuration.
- Plan : lets you preview any changes before you apply them.
- Apply : executes the changes defined by your configuration to create, update or destroy resources.
The phase of cleaning up the previously-created resources corresponds to Destroy.
terraform --help
terraform init
terraform plan
terraform apply # --auto-approve # -var "xy=xx"
terraform destroy
terraform
CLI Commands : https://www.terraform.io/docs/cli/commands/- Pratice with the CLI : terraform CLI exercices/trainings
- Kubernetes(GKE-AKS-EKS-Helm) tutorials
Providers - Modules
- Search a specific provider on Terraform registry https://registry.terraform.io/browse/providers
- Browse modules https://registry.terraform.io/browse/modules
Don't Repeat Yourself - Terragrunt
Keep your Terraform code DRY with terragrunt