Terraform tips & tricks: loops, if-statements, and gotchas