# Error: Invalid interpolation in variable default: Variables may not be used here

- **ID:** `terraform/invalid-interpolation-in-variable-default`
- **Domain:** terraform
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 85%

## Root Cause

Terraform variables cannot reference other variables in their default values; defaults must be literal values.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 1.5.0 | active | — | — |
| 1.6.0 | active | — | — |
| 1.7.0 | active | — | — |

## Workarounds

1. **Replace the variable reference with a literal value, or use a local value to compute the default after variable declaration.** (95% success)
   ```
   Replace the variable reference with a literal value, or use a local value to compute the default after variable declaration.
   ```
2. **Define a separate variable with no default and use a locals block to set the default based on other variables.** (90% success)
   ```
   Define a separate variable with no default and use a locals block to set the default based on other variables.
   ```

## Dead Ends

- **** — Adding escape characters or quotes around the interpolation does not resolve the fundamental limitation. (95% fail)
- **** — Moving the interpolation to a locals block still fails because the variable default is evaluated before locals are available. (80% fail)
