# Error: Invalid output value: output value type mismatch

- **ID:** `terraform/invalid-output-value-type`
- **Domain:** terraform
- **Category:** type_error
- **Verification:** ai_generated
- **Fix Rate:** 85%

## Root Cause

An output value's declared type does not match the actual type of the expression result.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Terraform v1.0+ | active | — | — |

## Workarounds

1. **Correct the type declaration to match the expression: e.g., change type = string to type = list(string) if output is a list** (95% success)
   ```
   Correct the type declaration to match the expression: e.g., change type = string to type = list(string) if output is a list
   ```
2. **Use tostring(), tolist(), etc. to convert the value to the declared type** (85% success)
   ```
   Use tostring(), tolist(), etc. to convert the value to the declared type
   ```

## Dead Ends

- **** — Without type constraint, output may still fail if used elsewhere expecting a specific type. (50% fail)
- **** — Hides the type mismatch but may cause downstream failures. (70% fail)
