- terraform init: Initializes a new or existing Terraform configuration, setting up the working directory and downloading any necessary providers and modules.
- terraform init -upgrade: Upgrades the provider plugins to the latest compatible versions while initializing. This is useful to ensure you have the latest provider features and bug fixes.
- terraform plan: Creates an execution plan that shows what actions Terraform will take to apply the current configuration. It does not make any changes; it only shows what will happen.
- terraform apply: Applies the changes defined in the Terraform configuration. It creates, updates, or deletes resources according to the execution plan generated by terraform plan.
- terraform validate: Validates the syntax and configuration of Terraform files. It checks for errors and warnings, ensuring the configuration is structurally sound.
- terraform fmt: Rewrites Terraform configuration files to a canonical format, making them consistent and more readable. It helps maintain a consistent style across the project.
- terraform destroy: Destroys all the resources created by Terraform for the current configuration. It prompts for confirmation before proceeding, as this operation is irreversible.
Regarding Terraform's main competitors include:
- AWS CloudFormation: A service provided by Amazon Web Services (AWS) for infrastructure as code. It allows users to define and provision AWS infrastructure using templates.
- Azure Resource Manager (ARM) Templates: Similar to AWS CloudFormation, ARM templates enable users to define and deploy Azure infrastructure as code.
- Google Cloud Deployment Manager: Google Cloud's infrastructure as code solution that allows users to describe and deploy Google Cloud Platform resources using YAML or Python templates.
- Pulumi: An open-source infrastructure as code platform that supports multiple cloud providers and programming languages, allowing users to write infrastructure code using familiar programming languages.
- Ansible: While not solely focused on infrastructure as code, Ansible is a popular automation tool that includes infrastructure provisioning capabilities.
Happy Learning :) #90daysofdevops #tws #devops