What is Terraform?
Terraform is an infrastructure as code (IaC) tool that allows you to build, change, and version infrastructure safely and efficiently.
IaC is a code (human readable) that deploys your infrastructure resources onto various platforms instead of managing them manually through a user interface.
How to install Terraform locally
- Download it from here
- Test it by running command
terraform -version
You can clone the code from my Github: Terraform Lab
HCL (Language) Basics
- HCL – Harshi-corp configuration language
- “.tf” is the extension of the configuration file
Terraform Execution Flow
- Terraform Initialisation command:
terraform init
- Terraform Plan command:
terraform plan
- Terraform Apply command:
terraform apply
Terraform Variable
Declaring a variable
Referencing a variable
Variable Type
Configure AWS-CLI
- Download it from here
- Check version
aws --version
- Configure keys
aws configure
- Test connection
aws sts get-caller-identity
References
- https://www.terraform.io/downloads
- https://aws.amazon.com/cli/
- https://registry.terraform.io/providers/hashicorp/local/latest/docs/resources/file
- https://registry.terraform.io/providers/hashicorp/aws/latest/docs
Please follow and like us:
I could not refrain from commenting. Exceptionally well written this article!