# Error: Invalid terraform version constraint

- **ID:** `terraform/invalid-terraform-version-constraint`
- **Domain:** terraform
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 90%

## Root Cause

The required_version setting in terraform block uses an unsupported operator or malformed version string.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Terraform v1.4.0+ | active | — | — |
| OpenTofu 1.6.0 | active | — | — |

## Workarounds

1. **Use valid constraint syntax: required_version = ">= 1.4.0, < 2.0.0"** (95% success)
   ```
   Use valid constraint syntax: required_version = ">= 1.4.0, < 2.0.0"
   ```
2. **Use pessimistic constraint operator: required_version = "~> 1.5"** (90% success)
   ```
   Use pessimistic constraint operator: required_version = "~> 1.5"
   ```

## Dead Ends

- **** — Comma is not a valid operator; Terraform expects space-separated constraints like '>= 1.0, < 2.0' is actually invalid, must use '>= 1.0, < 2.0' without comma or use '~>' operator. (60% fail)
- **** — The '=' operator is not supported; Terraform interprets bare numbers as pessimistic constraint operator '~>'. (40% fail)
