DevOps & Cloud Interview Prep: Real Scenarios & Answers

Terraform Apply Timeouts: IAM Role Batching at Scale


Listen Later

When terraform apply times out creating 100+ IAM roles, the culprit is usually AWS API throttling combined with Terraform's default parallelism — here's how to fix it.

You'll learn:

  • Why the default parallelism=10 isn't always safe and when raising it to -parallelism=50 helps vs. hurts
  • How AWS IAM's eventual-consistency model causes race conditions during bulk role creation
  • Batching strategies: splitting large role sets across multiple terraform apply runs or using for_each with targeted applies
  • Reading AWS API throttle errors in Terraform debug output (TF_LOG=DEBUG) to confirm the real bottleneck
  • Exponential backoff and retry tuning via the AWS provider's max_retries setting
  • Keywords: terraform apply timeout, AWS IAM role throttling, terraform parallelism, terraform at scale, IAM API rate limits

    🎧 Listen, then go deeper — DevOps & Cloud interview-prep ebooks at DevOpsInterview.Cloud

    ...more
    View all episodesView all episodes
    Download on the App Store

    DevOps & Cloud Interview Prep: Real Scenarios & AnswersBy https://DevOpsInterview.Cloud