{
  "slug": "pcl-invokes-multi-argument-functions-positionally-e306fe759936",
  "title": "PCL invokes multi-argument functions positionally",
  "tools": [
    "pulumi"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-07-08T12:41:08.000Z",
  "announced_at": "2026-07-08T12:41:08.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When invoking a function declared with `multiArgumentInputs`, pass one positional argument per input; put optional `invokeOptions` last. Use `null` for an omitted optional input when supplying options.",
    "examples": [
      "invoke(\"pkg:index:fn\", <arg1>, <arg2>)",
      "invoke(\"pkg:index:fn\", <arg1>, null, { provider = <provider> })"
    ],
    "gotchas": [
      "Version: v3.251.0",
      "function token (required): String token identifying the provider function.",
      "positional input arguments (required): Pass one argument for each declared input, in declaration order. Optional inputs can be `null`; requiredness and types depend on that function’s schema.",
      "invokeOptions: Optional final object after all input positions. Documented keys: `provider`, `parent`, `version`, `pluginDownloadUrl`, `dependsOn`. The source does not state that these keys are mutually exclusive.",
      "Prerequisite: Use Pulumi v3.251.0 or later for this PCL behavior.",
      "This positional invocation behavior applies to functions declared with `multiArgumentInputs`.",
      "The optional `invokeOptions` object follows one positional argument per input.",
      "Use `null` for an omitted optional input when supplying options.",
      "Calls with more than one argument per input plus the options object are rejected.",
      "PCL and program generators continue to observe the normalized object form."
    ]
  },
  "why_it_matters": "When writing PCL that invokes a function declared with `multiArgumentInputs`, pass each input positionally and place optional invoke options last.",
  "before": "The release note states that these functions previously took a single object argument, such as `invoke(\"pkg:index:fn\", { p1 = arg1, p2 = arg2 })`; this form is now rejected for functions declared with `multiArgumentInputs`.",
  "sources": [
    "https://github.com/pulumi/pulumi/releases/tag/v3.251.0",
    "https://github.com/pulumi/pulumi/pull/23571",
    "https://github.com/pulumi/pulumi/blob/v3.251.0/pkg/codegen/pcl/invoke_positional.go",
    "https://github.com/pulumi/pulumi/blob/v3.251.0/pkg/codegen/pcl/invoke.go"
  ],
  "rank": 0.97026,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave1b-20261016",
    "verdict_id": "wave1b-20261016:wave1b-20261016-cd20a6c41beb0517-6:gate",
    "evidence_hash": "fa3fa02e7c8104ec58a0e70cab20fad744eb74b504e4ac22c7fe0d650434cd3c"
  },
  "review": {
    "draft_hash": "e585932a13f406c2fc5bbf56875c1ebaaa7e7c04618bfa01243133a47b7e6d63",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave1b-20261016:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.97 >= 0.9; 2 needed) and Jev gave 0.66 (>= 0.6 needed)."
  }
}
