In this tutorial, you will learn about Terraform Cloud, sign up for an account, and create an organization.
»What is Terraform Cloud?
Terraform is an infrastructure as code tool that lets you define and manage infrastructure resources through human-readable configuration files. Terraform allows you to use a consistent workflow over your infrastructure lifecycle, regardless of the resource provider. The infrastructure as code workflow lets your declaratively manage a variety of services and automate your changes to them, reducing the risk of human error through manual operations.
Terraform Cloud builds on these features by managing Terraform runs in a consistent and reliable environment instead of on your local machine. It securely stores state and secret data, and can connect to version control systems so that you can develop your infrastructure using a workflow similar to application development. The Terraform Cloud UI provides a detailed view into the resources managed by a Terraform project and gives enhanced visibility into each Terraform operation.
Terraform Cloud also has a private registry for sharing your organization's Terraform modules and providers. Paid features include access controls for approving changes to infrastructure, detailed policy controls for governing the contents of Terraform configurations, cost estimates for runs, and more.
Terraform Cloud helps you collaborate on each step of your infrastructure development process. For example, each time you plan a new change, your team can review and approve the plan before you apply it.
In Terraform Cloud, your resources are organized by workspaces, which contain your resource definitions, environment and input variables, and state files. A Terraform operation occurs within a workspace, and Terraform uses the configuration and state for that workspace to modify your infrastructure.
Terraform Cloud supports three workflows for your Terraform runs:
- The CLI-driven workflow, which uses Terraform's standard CLI tools to execute runs in Terraform Cloud.
- The UI/Version Control System(VCS)-driven workflow, in which changes pushed to version control repositories trigger runs in the associated workspace.
- The API-driven workflow, which allows you to create tooling to interact with the Terraform Cloud API programmatically.
The tutorials in this collection will introduce the CLI and VCS-driven workflows. To learn more about the API-driven workflow, refer to Terraform Cloud's API Documentation.
»The CLI-driven workflow
In the CLI-driven workflow, you initiate Terraform operations in your Terminal, and use Terraform Cloud's ephemeral remote execution environments for your operations. Terraform Cloud securely stores any input and environment variables needed by your configuration, as well as your current and previous state files. The CLI-driven workflow enables collaboration and allows you to leverage the stability, security, and enhanced visiblity of Terraform Cloud while still using the same familiar Terraform workflow, with minimal additional configuration.
»The VCS-driven workflow
For the VCS-driven workflow, you must configure VCS access and create your workspace, then associate it with a repository containing your Terraform configuration. You can then configure your workspace to create speculative plans for any Pull Requests, which allows your team to review how the changes would modify infrastructure. Any merges to your main branch then trigger Terraform runs to implement your changes.
»Create an account
Visit https://app.terraform.io/signup/account and follow the prompts to create a free Terraform Cloud account.
Note: If you already have a Terraform Cloud account, go to to the next step.
When you sign up, you will receive an email asking you to confirm your email address. Confirm your email address before moving on. When you click the link to confirm your email address, the Terraform Cloud UI will ask which setup workflow you would like use. Select Start from scratch.
»Create an organization
The next screen will prompt you to create a new organization. Creating organizations of up to 5 users is free, and the members you add to the organization will be able to collaborate on your workspaces and share private modules and providers.
Tip: Create a tutorial-specific organization to manage the workspaces you create while running HashiCorp tutorials. This will give you a convenient, isolated sandbox environment in which to learn Terraform.
Enter an organization name and email address. You can use the same email address that you used for your account.
Note: If you want to join an existing organization, give the organization's administrator the email address you used to create an account. They will be able to send you an invite.
Click Create organization. In later tutorials, you will create and use a workspace within your new Terraform Cloud organization.
In this tutorial, you created a Terraform Cloud account and organization. For more information about organizations and their relationship to workspaces, teams, and users, refer to the Organizations documentation.
Now that you have created an account and organization, you are ready to authenticate and begin using Terraform Cloud.