In this post, I want to talk about Terraform Cloud.
What is the Terraform Cloud?
So the very first basic question is: What is Terraform Cloud? Terraform Cloud is an application that helps teams use Terraform together, it helps you collaborate on infrastructure.
Let me explain why the Terraform cloud defined like this.
Usually, when we use Terraform to build our infrastructure, we first need to download it and then writing the HCL code to describe what you want to do, then running commands like terraform init and terraform apply.
This is cool for the single developer, in other words, you use Terraform management the infrastructure by yourself. But what is the situation like if you work in a team with several other developers to use Terraform to maintain the infrastructure together?
Since you have code and files to maintain with teammates together, naturally, you will think we can use SCM tools like git or something like that. But the big problem is the Terraform state file because the content in this file is generated by Terraform dynamically, so you don’t know how to merge them, not to mention other issues that need to be considered when working in a team.
How could we solve this trouble? Terraform Cloud is the answer. It provides a central place for you and your team work together, it manages Terraform runs in a consistent and reliable environment, and includes easy access to shared state and secret data, access controls for approving changes to infrastructure, a private registry for sharing Terraform modules, detailed policy controls for governing the contents of Terraform configurations, and more.
Terraform Cloud is available as a hosted service at https://app.terraform.io. It offers free accounts for small teams, and paid plans with additional feature sets for medium-sized businesses.
About Product Names
Before mid-2019, all distributions of Terraform Cloud used to be called Terraform Enterprise; the self-hosted distribution was called PrivateTerraform Enterprise (PTFE). These previous names sometimes still appear in supporting tools (like the
tfe Terraform provider, which is also intended for use with Terraform Cloud).
Terraform Cloud offers a team-oriented remote Terraform workflow.
Users are individual members of a Terraform Cloud organization. As a user, you manage, plan, and apply collections of infrastructure in workspaces. These workspaces contain Terraform configuration files, environment variables, Terraform variables, and state files — everything Terraform needs to manage a given collection of infrastructure.
A common workflow is:
- Author – Create or update the configuration file in HCL based on the scoped parameters
- Select workspace – Create or select a workspace for your resources
- Version Control – Check your configuration files into a version control system (VCS) as a central source of truth where your changes can be managed
- Configure Variables – Define your workspace’s Terraform variables and environment variables
- Plan & Apply – Execute Terraform Cloud runs (plans and applies) to manage your infrastructure
Since Terraform Cloud supports multiple users, you can collaborate with your team on each of these steps. For instance, each time you plan a new change, your team can see and approve the plan before it is applied.
Sign up for Terraform Cloud
Now it is time to get your hands dirty, let start using Terraform Cloud!
In order to use Terraform Cloud, you should have a Terraform Cloud account first. So in this post, I will show you how to register a Terraform Cloud account.
This link https://app.terraform.io/signup/account will navigate you to the registration page.
Fulfill the blank text field accordingly and check the checkboxes and finally click the “Create account” button then you will have a free Terraform cloud account.
Now you already have an Terraform Cloud account, in the next post i will show you how to leverage Terraform Cloud to build your very first project.