Manage Similar Resources with Count
Manage similar Terraform resources using the count argument. Create a VPC with a load balancer and EC2 instances. Then use count to manage a configurable number of similar AWS EC2 instances across multiple subnets.
Manage Similar Resources with For Each
Provision similar infrastructure components by iterating over a data structure with the for_each argument. Duplicate an entire VPC including a load balancer and multiple EC2 instances for each project defined in a map.
Authenticate the CLI with Terraform Cloud
Log into Terraform Cloud or Enterprise with the Terraform CLI to migrate state, trigger remote runs, and interact with Terraform Cloud from the command line.
Create Resource Dependencies
Create an implicit dependency between an EC2 instance and its Elastic IP using variable interpolation. Create explicit dependencies on an S3 Bucket and SQS Queue using terraform configuration. Learn how Terraform creates independent resources in parallel.