# Error: Failed to download module: module "vpc" (path: modules/vpc) source "github.com/terraform-aws-modules/terraform-aws-vpc?ref=v5.0.0" is not a valid module source

- **ID:** `terraform/terraform-module-source-invalid`
- **Domain:** terraform
- **Category:** module_error
- **Verification:** ai_generated
- **Fix Rate:** 95%

## Root Cause

The module source address uses an unsupported format or has a typo, such as missing the 'git::' prefix for Git repositories.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Terraform v1.5 | active | — | — |
| Terraform v1.6 | active | — | — |
| Terraform v1.7 | active | — | — |

## Workarounds

1. **Use the correct Git source format: 'git::https://github.com/terraform-aws-modules/terraform-aws-vpc.git?ref=v5.0.0'.** (95% success)
   ```
   Use the correct Git source format: 'git::https://github.com/terraform-aws-modules/terraform-aws-vpc.git?ref=v5.0.0'.
   ```
2. **Use the Terraform Registry address: 'terraform-aws-modules/vpc/aws' with version constraint.** (90% success)
   ```
   Use the Terraform Registry address: 'terraform-aws-modules/vpc/aws' with version constraint.
   ```

## Dead Ends

- **** — Terraform requires explicit scheme prefixes for non-HTTP sources; GitHub URLs without 'git::' are treated as HTTP, which fails. (80% fail)
- **** — Terraform expects a full URL with scheme; omitting 'https://' leads to an invalid source error. (70% fail)
- **** — Relative paths only work for local modules; remote modules require a full URL or registry address. (90% fail)
