# Error: Invalid required_providers block: duplicate required_providers block

- **ID:** `terraform/invalid-required-providers-block`
- **Domain:** terraform
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 95%

## Root Cause

Multiple required_providers blocks exist in the same module, which Terraform does not allow.

## Version Compatibility

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

## Workarounds

1. **Consolidate all provider requirements into a single required_providers block in the root module. Remove any duplicate blocks.** (95% success)
   ```
   Consolidate all provider requirements into a single required_providers block in the root module. Remove any duplicate blocks.
   ```
2. **If using Terraform 1.5+, use the 'required_providers' attribute in a single block, combining all entries.** (90% success)
   ```
   If using Terraform 1.5+, use the 'required_providers' attribute in a single block, combining all entries.
   ```

## Dead Ends

- **** — Merging the blocks with incorrect syntax still results in a duplicate block error. (90% fail)
- **** — Adding a required_providers block inside a submodule does not fix the root module; the error is per module. (80% fail)
