Repeatability
Medium
The pattern of extracting hardcoded values into .tfvars is structurally repeatable, but each codebase has idiosyncratic naming, module boundaries, and implicit coupling that require case-by-case decisions. With 15 modules and 80+ resources, the agent will hit non-trivial variation across files.
Ambiguity Tolerance
Low
Success criteria are underspecified: 'consistent naming convention' and 'safely deploy to dev/staging/prod' require human agreement on what those conventions are and what 'safe' means. The agent cannot know whether a value like an IP range is environment-specific or shared without domain context.
Data & Tool Availability
High
The agent needs read/write access to the .tf files, which is straightforward to provide. Terraform CLI can validate syntax and run plan in dry-run mode, giving the agent a feedback loop to catch structural errors before any real infrastructure is touched.
Error Cost
High
A refactor that silently changes resource names or miscategorizes a value can cause Terraform to destroy and recreate resources on the next apply, including stateful ones like RDS instances. Secrets mishandled in .tfvars committed to version control are a real security risk.
Human Judgment Required
High
Deciding which values are truly environment-specific versus shared, what the naming convention should be, and whether the refactored plan is semantically equivalent to the original requires infrastructure knowledge and organizational context the agent does not have.