{
  "id": "terraform/too-many-arguments-to-import",
  "signature": "Error: Too many command line arguments: expected 2 for import, got 3",
  "signature_zh": "错误：命令行参数过多：导入命令期望 2 个参数，实际收到 3 个",
  "regex": "Error: Too many command line arguments: expected 2 for import, got \\d+",
  "domain": "terraform",
  "category": "config_error",
  "subcategory": null,
  "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.",
  "root_cause_type": "generic",
  "root_cause_zh": "terraform import 命令被调用的位置参数超过了所需的两个（资源地址和 ID），通常是由于多余参数或字符串引用错误。",
  "versions": [
    {
      "version": "Terraform v1.7.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Terraform v1.8.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Terraform v1.9.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Flags must be placed before the positional arguments, not after. Terraform interprets -input=false as a third positional argument.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "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.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Place all flags before the arguments: `terraform import -input=false aws_instance.my_instance i-12345`",
      "success_rate": 0.95,
      "how": "Place all flags before the arguments: `terraform import -input=false aws_instance.my_instance i-12345`",
      "condition": "",
      "sources": []
    },
    {
      "action": "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`",
      "success_rate": 0.9,
      "how": "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`",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Place all flags before the arguments: `terraform import -input=false aws_instance.my_instance i-12345`",
    "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`"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://developer.hashicorp.com/terraform/cli/commands/import",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.9,
  "resolvable": "true",
  "first_seen": "2024-02-10",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}