{
  "slug": "terragrunt-terraform-version-resolves-tfr-modules-from-a-constraint-f3a065c959c3",
  "title": "terragrunt `terraform.version` resolves `tfr://` modules from a constraint",
  "tools": [
    "terragrunt"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-07-14T14:31:42.000Z",
  "announced_at": "2026-07-14T14:31:42.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "For a `tfr://` registry module in Terragrunt v1.1.1, enable the `version-attribute` experiment and set `version` to a constraint; Terragrunt resolves the highest published match before downloading. Do not also set `?version=` on that source.",
    "examples": [
      "terraform {\n  source  = \"tfr://registry.opentofu.org/terraform-aws-modules/vpc/aws\"\n  version = \"~> 3.3\"\n}",
      "terragrunt --experiment version-attribute run -- init"
    ],
    "gotchas": [
      "Version: v1.1.1",
      "Availability: Experimental; gated by the `version-attribute` experiment.",
      "--experiment version-attribute (required): Enables the `version` attribute experiment in v1.1.1.",
      "terraform.source (required): The module source; the `version` attribute applies only to `tfr://` sources.",
      "terraform.version (required): A version constraint for resolving a `tfr://` module. Do not combine it with inline `?version=` on the same source; the docs say this combination is an error.",
      "Prerequisite: Use Terragrunt v1.1.1 or later; in v1.1.1 the `version-attribute` experiment must be enabled with `--experiment version-attribute` or `TG_EXPERIMENT=version-attribute`.",
      "The `version` attribute applies to `tfr://` sources only.",
      "It cannot be combined with an inline `?version=` on the same source.",
      "Docs conflict: The currently published docs describe later behavior: they say the experiment is no longer needed by default and is scheduled to complete in v1.2.0. The v1.1.1 release note says the flag is required, so use the release-note behavior for v1.1.1."
    ]
  },
  "why_it_matters": "Pin a registry module in a Terragrunt configuration using a version constraint.",
  "sources": [
    "https://github.com/gruntwork-io/terragrunt/releases/tag/v1.1.1",
    "https://docs.terragrunt.com/reference/hcl/blocks/"
  ],
  "rank": 0.93045,
  "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": "wave2a-20261017",
    "verdict_id": "wave2a-20261017:wave2a-20261017-cb1fc125bf207e18-1:gate",
    "evidence_hash": "f1032caa378f2413e91088be0ebc3928dc2223d50573de6b9a471ab8763a8672"
  },
  "review": {
    "draft_hash": "31ad89a286964c2ce86e91b6ff3d10e4540bb5bde81983720ed7a95c0e47db69",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave2a-20261017:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.93 >= 0.9; 2 needed) and Jev gave 0.63 (>= 0.6 needed)."
  }
}
