Files
Michael Kriese dec41b697e test(manager/terraform): close branch coverage gaps (#45948)
test(manager/terraform): close the terraform family coverage gaps

Adds two terraform extractions that no test covered: a lock file that
cannot be read, and one that holds no locks. Both leave the deps without
a locked version.

Marks three guards. The lockfile update path needs a change that also
satisfies the recorded constraints, `extractTFLintPlugin()` never
returns null, and only terragrunt's already-ignored default case leaves
its result unset.

Two implicit elses stay counted, in the terraform module extractor and
the tflint key parser: a coverage-ignore hint does not attach to an
`else if`, so they carry a plain note.

Co-authored-by: Claude Opus 5 <michael.kriese+claude-code@mend.io>
2026-09-15 07:10:10 +00:00
..
2023-11-10 11:00:35 +00:00

Currently by default, Terragrunt support is limited to Terraform registry sources and GitHub sources that include SemVer refs, e.g. like github.com/hashicorp/example?ref=v1.0.0.

You can create a custom versioning config to support non-SemVer references. For example, if you want to reference a tag like module-v1.2.5, a block like this would work:

{
  "terragrunt": {
    "versioning": "regex:^((?<compatibility>.*)-v|v*)(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)$"
  }
}

Pinned Terragrunt dependencies like the following will get a PR whenever there is a newer version available:

terraform {
  source = "github.com/hashicorp/example?ref=v1.0.0"
}

Terraform lockfiles

The Terragrunt manager supports lock file maintenance for .terraform.lock.hcl artifacts. These artifacts will be updated if and only if the update type is lockFileMaintenance.