# 错误：命令行参数过多：导入命令期望 2 个参数，实际收到 3 个

- **ID:** `terraform/too-many-arguments-to-import`
- **领域:** terraform
- **类别:** config_error
- **验证级别:** ai_generated
- **修复率:** 90%

## 根因

terraform import 命令被调用的位置参数超过了所需的两个（资源地址和 ID），通常是由于多余参数或字符串引用错误。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| Terraform v1.7.0 | active | — | — |
| Terraform v1.8.0 | active | — | — |
| Terraform v1.9.0 | active | — | — |

## 解决方案

1. ```
   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`
   ```

## 无效尝试

- **** — Flags must be placed before the positional arguments, not after. Terraform interprets -input=false as a third positional argument. (70% 失败率)
- **** — 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% 失败率)
