DevOps (Day: 61) Terraform Commands
Maninder Singh
AWS || Networking || Docker || Mentor & Tutor || System Engineer Antier Solution
Dear Learners, Today topic on Terraform Commands form basics to Advanced.
TABLE OF CONTENTS
Task-01 Terraform Commands
Task-01
Find purpose of basic Terraform commands which you'll use often
1 Terraform init:
Initializes a new or existing Terraform working directory by downloading the required provider plugins and sets up the backend to store the state. This command must be run before any other Terraform command is executed.
2 Terraform init-upgrade:
Upgrades the configuration to the latest version of Terraform. This is useful if you have upgraded your Terraform version and want to ensure that your configuration is compatible with the new version.
3 Terraform plan:
Shows the changes that Terraform will make to the infrastructure to bring it into the desired state,without actually making the changes. This is useful to see what changes terraform will make before actually applying them.
4 Terraform apply:
Applies the changes to the infrastructure described in the Terraform configuration files. This command will create,modify,or delete resources as needed to bring the infrastructure into the desired state.
5 Terraform Validates:
Validates the syntax and structure of the Terraform configuration file. This command checks for errors, missing required arguments and other issues.
6 Terraform fmt:
Rewrites terraform Configuration files to a canonical format, Which makes it easier to read and manintain.
7 Terraform destroy:
领英推荐
Destroys all the infrastructure created by Terraform, freeing up the resources and ensuring that you are not paying for unused infrastructure. This command should be used with caution as it will delete all the resources described in the configuration file.
What are the main competitors of Terraform?
AWS Cloud Formation:
AWS CloudFormation is an IaC tool provided by Amazon web Services (AWS). It allows users to define and manage infrastructure resources in a declarative way using JSON or YAML templates. CloudFormation supports a wide range of AWS services and is tightly integrated with other AWS tools and services.
Ansible:
Ansible is an open-source tool that uses YAML scripts to define and manage infrastructure resiurces. Ansible can be used for provisioning, configuration management and application deployments across multiple platforms and cloud providers.
Kubernets:
Kubernetes is another IT automation alternative to Terraform. It is an open-source solution that enables automated deployment,management,and scaling of containerized application. It simplifies containerized applications. It simplifies container communication. It facilitated container discovery and management with an application.
Puppet:
Puppet is an another open-source IaC tool that uses a declarative language to define and manage infrastructure resource. Puppet has a large community of users and contributors and supports a wide range of platforms and the cloud providers.
Chef:
Chef is an open-source IaC tool that uses Ruby scripts to define and manage infrastructure resources. Chef is particularly well-suited for managing large-scale infrastructure and supports a wide range of platforms and cloud providers.
Packer:
Packer create identical machine images for the multiple platforms from a single resource configuration. A common use case is creating golden images for organisations to use in cloud infrastructure.
Cloud Foundry:
Cloud Foundry is an open source cloud application platform that makes it faster and easier to build test, deploy and scale apps in your choice of cloud,framework and language. Remove the cost and complexity associated with configuring, managing and securing infrastructure for your app with Cloud Foundry.
Hope I helped you in understanding the concept in a better way!!
Happy Learning!!
Next Topic
Day 62: Blocks and Resources used in Terraform.
?I help Businesses Upskill their Employees in DevOps | DevOps Mentor & Process Architect
1 年Thank you, Maninder Singh, for sharing such an informative article on Terraform Commands and helping us enhance our knowledge in the field of DevOps. Looking forward to more such insightful posts from you. Keep up the good work
DevOps/Cloud Engineer || AWS || AZURE || Linux || Gitlab || Jenkins || Docker || Networking || Microsoft Certified: Azure Administrator Associate |
1 年Great article on Terraform commands! It's essential to understand its competitors and the various commands to make maximum use of the tool. Thanks for sharing this informative post. #DevOps #Terraform #Automation.
DevOps Engineer at BH Mobile Pte Ltd || AWS || Linux || CICD || Jenkins || Git GitHub || Docker || Kubernetes || Terraform ||
1 年Great share Maninder Singh
AWS || Networking || Docker || Mentor & Tutor || System Engineer Antier Solution
1 年++