One of the best things about Terraform is that you can use it everywhere - AWS, Azure, GCP, and many more cloud providers. This helps prevent having to learn the nuances that the underlying API will have. You can just learn HCL (HashiCorp Configuration Language). Start with installing Terraform using your OS of choice.
Getting Started
- From your working directory initialize Terraform - this will download the plugin for the cloud provider you intend on using:
terraform init
Lint your code with a validate:
terraform validate
Review HCL with a plan:
terraform plan
Write the plan to an out file for the apply to consume:
terraform plan -out out.terraform
Apply the Terraform code:
terraform apply
Apply the code using a plan:
terraform apply out.terraform
Show current state:
terraform show
You can also read the Terraform state file:
cat terraform.tfstate