Cloud Internship 2026
Chapter 9
Commands Reference
Terraform
| Command | What it does |
|---|---|
| terraform init | Initialise working directory, download providers |
| terraform fmt | Format all .tf files to canonical style |
| terraform validate | Check syntax and configuration validity |
| terraform plan | Preview changes before applying |
| terraform apply | Provision or update resources |
| terraform apply -auto-approve | Apply without confirmation prompt (use carefully) |
| terraform destroy | Remove all managed resources |
| terraform output | Show all output values |
| terraform state list | List all resources in state |
| terraform state show <resource> | Show details of a specific resource in state |
| terraform import <resource> <id> | Import an existing resource into state |
AWS CLI — Common Commands
| Command | What it does |
|---|---|
| aws sts get-caller-identity | Confirm which IAM user/role you are authenticated as |
| aws ec2 describe-vpcs | List all VPCs in current region |
| aws ec2 describe-instances | List all EC2 instances |
| aws cloudformation describe-stacks | List all CloudFormation stacks and their status |
| aws cloudformation delete-stack --stack-name X | Delete a CloudFormation stack |
| aws s3 ls | List all S3 buckets |
| aws rds describe-db-instances | List all RDS instances |
Docker (Weeks 9–11)
| Command | What it does |
|---|---|
| docker build -t name:tag . | Build an image from a Dockerfile |
| docker run -p 8080:3000 name:tag | Run a container mapping host port 8080 to container port 3000 |
| docker ps | List running containers |
| docker ps -a | List all containers including stopped |
| docker exec -it <id> sh | Open a shell inside a running container |
| docker system prune -f | Remove all stopped containers and dangling images |