# 错误：导入 ID 格式无效：应为 <资源类型>.<名称> <ID>

- **ID:** `terraform/invalid-import-id-format`
- **领域:** terraform
- **类别:** config_error
- **验证级别:** ai_generated
- **修复率:** 95%

## 根因

导入命令需要特定的两部分参数格式（资源地址和 ID），但用户提供了单个字符串或格式错误的输入。

## 版本兼容性

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

## 解决方案

1. ```
   Use the correct two-argument format with a space: `terraform import aws_instance.my_instance i-12345`
   ```
2. ```
   If using shell variables, ensure they expand to separate arguments: `terraform import aws_instance.my_instance "$INSTANCE_ID"`
   ```

## 无效尝试

- **** — Terraform expects a space separator between the resource address and the ID, not a colon or other delimiter. (80% 失败率)
- **** — The import command treats the quoted string as a single argument, so it doesn't parse the resource address and ID separately. (90% 失败率)
