Interview practice question
Terraform code full of hard-coded values
Cloud & DevOps · Terraform and IaC · Beginner
You inherit Terraform code with hard-coded IDs, regions and names everywhere. How would you clean it up?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Introduce variables with types/descriptions.
- Locals for derived names/tags.
- Data sources instead of hard-coded IDs.
- Refactor gradually; plan shows no changes.
- Modules for repeated patterns.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.