Terraform Tutorial — Terraform Cloud & Enterprise
Terraform Cloud (HCP Terraform) and Terraform Enterprise bring collaboration, governance, and automation to your Terraform workflow.
Terraform Cloud vs Enterprise
| Feature | Cloud (Free) | Cloud (Plus) | Enterprise |
|---|---|---|---|
| Remote state | ✅ | ✅ | ✅ |
| Remote runs | ✅ | ✅ | ✅ |
| VCS integration | ✅ | ✅ | ✅ |
| Team management | Limited | ✅ | ✅ |
| Sentinel policies | ❌ | ✅ | ✅ |
| Audit logging | ❌ | ✅ | ✅ |
| SSO/SAML | ❌ | ✅ | ✅ |
| Self-hosted | ❌ | ❌ | ✅ |
| Private network | ❌ | ❌ | ✅ |
Key Features
Remote State Management
Store and share state securely without managing S3 backends:
terraform {
cloud {
organization = "my-org"
workspaces {
name = "my-app-prod"
}
}
}
Sentinel Policy as Code
Enforce governance rules before infrastructure changes apply:
# Only allow t3 instance types
import "tfplan/v2" as tfplan
main = rule {
all tfplan.resource_changes as _, rc {
rc.type is "aws_instance" implies
rc.change.after.instance_type matches "t3.*"
}
}
Run Triggers
Automatically trigger downstream workspaces when upstream infrastructure changes.
Cost Estimation
See estimated monthly costs before applying changes.
Getting Started
# Login to Terraform Cloud
$ terraform login
# Initialize with cloud backend
$ terraform init
# Plan and apply runs remotely
$ terraform plan
$ terraform apply