# Error: Module not found: module "vpc" source "terraform-aws-modules/vpc/aws" not found in registry

- **ID:** `terraform/module-source-not-found`
- **Domain:** terraform
- **Category:** module_error
- **Verification:** ai_generated
- **Fix Rate:** 85%

## Root Cause

The specified module source does not exist in the Terraform registry or the version constraint does not match any published version.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Terraform v1.5.0 | active | — | — |
| Terraform v1.6.0 | active | — | — |
| Terraform v1.7.0 | active | — | — |

## Workarounds

1. **Verify the module name and namespace in the Terraform registry: `terraform-aws-modules/vpc/aws` is correct; check for typos. Then run 'terraform init'.** (85% success)
   ```
   Verify the module name and namespace in the Terraform registry: `terraform-aws-modules/vpc/aws` is correct; check for typos. Then run 'terraform init'.
   ```
2. **If the module is private, add a module source with a Git URL: `source = "git::https://github.com/org/terraform-aws-vpc.git?ref=v3.0.0"` and run 'terraform init'** (90% success)
   ```
   If the module is private, add a module source with a Git URL: `source = "git::https://github.com/org/terraform-aws-vpc.git?ref=v3.0.0"` and run 'terraform init'
   ```

## Dead Ends

- **Run 'terraform init' without any flags** — Init can only install modules if the source is valid; it won't fix a non-existent source. (95% fail)
- **Use a local file path instead of the registry source** — The local path must contain the module; a random path won't work. (80% fail)
- **Add a version constraint like 'version = "latest"'** — The module doesn't exist at all; no version constraint can fix that. (90% fail)
