Table of contents
Terraform is an open-source infrastructure as code software tool that enables you to safely and predictably create, change, and improve infrastructure.
The main purpose of the Terraform language is declaring resources, which represent infrastructure objects. All other language features exist only to make the definition of resources more flexible and convenient.
Terraform lets you use the same workflow to manage multiple providers and handle cross-cloud dependencies. This simplifies management and orchestration for large-scale, multi-cloud infrastructures.
The Typical Terraform Workflow
Typically, this workflow involves some manual steps that are easily automatable. For example, using the Terraform CLI we have to run the command
terraform plan to check the effect of our newly prepared configuration files. Similarly, we have to execute the command
terraform apply to propagate the changes to the live environment.
If you want to have all of the important Terraform commands in one place, take a look at our Terraform Cheat Sheet.
How many providers does Terraform support?
- Google Cloud Platform.
- Alibaba Cloud.
- Oracle Cloud Infrastructure.
Benefit of using Terraform in Cloud Ops
- Automating Terraform Orchestration with Custom Tooling
- Building infrastructure provisioning pipelines
- Leveraging GitOps to Automate Delivery of IaC
- Automated Terraform CLI Workflow
How to define Terraform template in Cloud Ops
With Cloud Ops, we need to define modules of Terraform corresponding with Cloud Ops template launching's configuration:
|Resource provisioning||main.tf||This is our main configuration file where we are going to define our resource definition|
|Parameter variable||variables.tf||This is the file where we are going to define our variables|
|Tagging||N/A||Not available in Terraform|
|Script||N/A||Not available in Terraform|
|Output||Output values make information about your infrastructure available on the command line, and can expose information for other Terraform configurations to use. Output values are similar to return values in programming languages.|