In this guide, we’ll walk through configuring and running Terraform Cloud Workspaces using local execution mode. Follow each step to authenticate, set up AWS credentials, create your workspace, and manage your infrastructure—all from your local machine.Documentation Index
Fetch the complete documentation index at: https://notes.kodekloud.com/llms.txt
Use this file to discover all available pages before exploring further.

Table of Contents
- Authenticate the CLI with Terraform Cloud
- Configure AWS Credentials
- Create a Terraform Cloud Workspace
- Match Versions & Set Execution Mode
- Initialize, Plan, and Apply
- Verify in Terraform Cloud
- Tear Down Infrastructure
1. Authenticate the CLI with Terraform Cloud
First, log in to Terraform Cloud from your terminal:
| Command | Description |
|---|---|
terraform login | Authenticate your local CLI with Terraform Cloud |
2. Configure AWS Credentials
Export your AWS credentials as environment variables:Never commit your AWS credentials or API tokens to version control. Use environment variables or a secrets manager.
These lab environments automatically tear down after one hour, so your temporary credentials remain safe.
| Environment Variable | Purpose |
|---|---|
AWS_ACCESS_KEY_ID | AWS API access key |
AWS_SECRET_ACCESS_KEY | AWS API secret key |
3. Create a Terraform Cloud Workspace
In Terraform Cloud’s web UI:- Select your organization.
- Click New Workspace → CLI-driven workflow.
- Enter:
- Name:
devops-aws-myapp-dev - Description: Development environment for MyApp on AWS.
- Name:

backend.tf (or your chosen .tf file):
4. Match Versions & Set Execution Mode
Ensure your local Terraform version matches the workspace setting:- Set Terraform Version to match your local client.
- Change Execution Mode to Local.
- Save your changes.
