Sign up for Terraform Cloud, which provides free remote state storage, a stable run environment, version control system (VCS) driven plans and applies, a collaborative web GUI, and more. Create your first organization.
4min
Create a workspace
Create a CLI-driven Terraform Cloud workspace. Update configuration to enable integration with Terraform Cloud.
4min
Create infrastructure
Set EC2 instance attributes using Terraform Cloud workspace variables. Create the instance by planning and applying a run in Terraform Cloud.
4min
Change infrastructure
Use command line input variables to modify infrastructure managed by Terraform Cloud. Review workspace contents and interface.
3min
Destroy resources and workspaces
Destroy the resources in a Terraform Cloud workspace, and delete the workspace via the web UI.
5min
Enforce a policy
Create a version-controlled policy to check the Terraform version using Sentinel, a policy-as-code platform. Fork a demo repo, connect the policy to Terraform Cloud, and queue a plan to test the policy.
5min
Control costs with policies
Write a soft-mandatory Sentinel policy against example infrastructure to limit its cost to less than one hundred dollars a month.
3min
What is Infrastructure as Code with Terraform?
Learn how infrastructure as code lets you safely build, change, and manage infrastructure. Try Terraform.
9min
Install Terraform
Install Terraform on Mac, Linux, or Windows by downloading the binary or using a package manager (Homebrew or Chocolatey). Then create a Docker container locally by following a quick-start tutorial to check that Terraform installed correctly.
11min
Build infrastructure
Authenticate to AWS and create an EC2 instance under the AWS free tier. Write and validate Terraform configuration, initialize a configuration directory, and plan and apply a configuration to create infrastructure.
4min
Change infrastructure
Modify EC2-instance configuration to use a different Ubuntu version. Plan and apply the changes to re-provision a new instance that reflects the new configuration. Learn how Terraform handles infrastructure change management.
2min
Destroy infrastructure
Destroy the AWS EC2 instance you created in the previous tutorials. Evaluate the plan and confirm the destruction.
4min
Define input variables
Declare your AWS EC2 instance name as a variable. Reference the variable in Terraform configuration. Define variables using command line flags and default values.
3min
Query data with outputs
Declare output values to display an EC2 instance's ID and public IP address. Display all outputs and query specific outputs. Define what data stored in Terraform state is relevant to the operator or end user.
8min
Store remote state
Configure Terraform to store state in Terraform Cloud. Add a remote state block directly to configuration or set an environment variable to load remote state configuration when Terraform initializes.
1min
Week 2 - Wrap-up
This week you learned about the Terraform configuration language, used Modules and Workspaces to organize your configuration, and explored Runs and the Git Repo Structure.