# Error: Too many command line arguments: expected 2 for import, got 3

- **ID:** `terraform/too-many-arguments-to-import`
- **Domain:** terraform
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 90%

## Root Cause

The terraform import command was invoked with more than the required two positional arguments (resource address and ID), often due to extra arguments or misquoted strings.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Terraform v1.7.0 | active | — | — |
| Terraform v1.8.0 | active | — | — |
| Terraform v1.9.0 | active | — | — |

## Workarounds

1. **Place all flags before the arguments: `terraform import -input=false aws_instance.my_instance i-12345`** (95% success)
   ```
   Place all flags before the arguments: `terraform import -input=false aws_instance.my_instance i-12345`
   ```
2. **If you need to specify a provider alias, use it in the resource address: `terraform import 'aws_instance.my_instance[provider=aws.us_east_1]' i-12345`** (90% success)
   ```
   If you need to specify a provider alias, use it in the resource address: `terraform import 'aws_instance.my_instance[provider=aws.us_east_1]' i-12345`
   ```

## Dead Ends

- **** — Flags must be placed before the positional arguments, not after. Terraform interprets -input=false as a third positional argument. (70% fail)
- **** — Provider aliases are specified via the resource address itself (e.g., aws_instance.my_instance[provider=aws.us_east_1]), not as a separate argument. (60% fail)
