* test(manager): cover twelve else-if branches The trailing `else if` of a chain leaves v8 counting an implicit else that no coverage-ignore hint can suppress. Fourteen of those were marked as structurally unreachable, but only two of them actually are -- each of these twelve has an input that takes it: - `bazel`: an archive url whose file name is only a suffix, which strips to an empty value, so neither value nor digest is set - `cargo`: a `[package]` section with no `version` at all - `composer`: an inline `package` repository, which the discriminated union does carry, contrary to the comment that claimed otherwise - `deps-edn`: an `:mvn/repos` entry whose spec is a plain string - `gomod`: an update where only the `go` directive changed, leaving no additional dependencies to count - `helmfile`: a release with an empty chart name, which is neither a local path nor an oci ref and yields an empty repo name - `nuget`: a lock file that is gone after the restore - `swift`: a comma where `from` expects a colon, and where `from:` expects a version -- both are labels the state machine searches for and then ignores - `terraform`: a module source too short to be a registry module - `tflint-plugin`: a quoted attribute that is neither version nor source - `travis`: a matrix `node_js` that is a number The stale comments go with them. Three more in `swift` were already wrong before this change: the branches they described were covered. Co-authored-by: Claude Opus 5 <michael.kriese+claude-code@mend.io> * refactor(manager): collapse two exhaustive else-if chains `glasskube` and `gradle` were the only two of the fourteen trailing `else if` branches that really are unreachable, and both are provable from a type rather than from a reading of the surrounding code: - `glasskube` parses resources with a schema that admits exactly `Package`, `ClusterPackage` and `PackageRepository`, and filters anything else out - `gradle`'s `ContentDescriptorSpec.mode` is `'include' | 'exclude'` Turning the final `else if` into a plain `else` drops the phantom branch v8 was counting. With these, the manager tree reaches 100% branch coverage. The glasskube check is inverted so that the single-literal discriminant narrows for the compiler. Co-authored-by: Claude Opus 5 <michael.kriese+claude-code@mend.io> * test(manager/travis): inline the numeric node_js fixture The three-line fixture went into `__fixtures__` only because every other fixture in this spec is loaded through `Fixtures.get`. A reader of the test should be able to see the input without opening a second file, so write it inline with `codeBlock`. Co-authored-by: Claude Opus 5 <michael.kriese+claude-code@mend.io> --------- Co-authored-by: Claude Opus 5 <michael.kriese+claude-code@mend.io>
Terraform vs OpenTofu
Renovate can not know if you want to use the Terraform or OpenTofu registry.
By default, Renovate uses the Terraform registry (registry.terraform.io) for providers and modules without a registry definition.
You can override this default with your own packageRules, for example:
{
"packageRules": [
{
"matchDatasources": ["terraform-provider", "terraform-module"],
"registryUrls": ["https://registry.opentofu.org"]
}
]
}
Supported dependencies
Renovate supports updating the Terraform dependencies listed below. Check the tables to see where some dependencies can be hosted.
Modules
| Name | Public hosting | Private hosting |
|---|---|---|
| GitTags | yes | yes |
| GithubTags | yes | yes |
| TerraformRegistry | yes | yes |
Providers
Providers are deprecated in Terraform 0.13.0.
| Name | Public hosting | Private hosting |
|---|---|---|
| TerraformRegistry | yes | yes |
required_providers block
Needs Terraform >= 0.13.0.
| Name | Public hosting | Private hosting |
|---|---|---|
| TerraformRegistry | yes | yes |
required_version
Renovate can update the required_version attribute of the Terraform block.
helm_release
Renovate can update the version attribute of helm_release resources. This applies to both helm chart repositories and charts published in OCI registries.
| Name | Public hosting | Private hosting |
|---|---|---|
| chart repository | yes | yes |
Docker
Renovate can update image references of the Docker provider resources (docker\_\*).
| Name | Public hosting | Private hosting |
|---|---|---|
| Docker registry | yes | yes |
Kubernetes
Renovate can update image references of Kubernetes provider resources (kubernetes\_\*).
| Name | Public hosting | Private hosting |
|---|---|---|
| Docker registry | yes | yes |
tfe_workspaces
Renovate can update tfe_workspaces.
Renovate searches for the terraform_version argument.
Range constraints
Renovate understands these Terraform range constraints:
| Terraform range | Notes |
|---|---|
>= 1.2.0 |
version 1.2.0 or newer |
<= 1.2.0 |
version 1.2.0 or older |
~> 1.2.0 |
any non-beta version >= 1.2.0 and < 1.3.0, e.g. 1.2.X |
~> 1.2 |
any non-beta version >= 1.2.0 and < 2.0.0, e.g. 1.X.Y |
>= 1.0.0, <= 2.0.0 |
any version between 1.0.0 and 2.0.0 inclusive |
Disabling parts of the manager
You can use these depTypes for fine-grained control, for example to disable parts of the Terraform manager.
| Resource | depType |
Notes |
|---|---|---|
| Terraform provider | provider |
|
| required Terraform provider | required_provider |
|
| required Terraform version | required_version |
This handles the required_version in terraform blocks |
| TFE workspace | tfe_workspace |
This handles the terraform_version argument in tfe_workspace resources |
| Terraform module | module |
|
| Helm release | helm_release |
|
| Docker container | docker_container |
|
| Docker image | docker_image |
|
| Docker service | docker_service |
|
| Kubernetes CronJob | kubernetes_cron_job |
|
| Kubernetes CronJob v1 | kubernetes_cron_job_v1 |
|
| Kubernetes DaemonSet | kubernetes_daemon_set |
|
| Kubernetes DaemonSet v1 | kubernetes_daemon_set_v1 |
|
| Kubernetes Deployment | kubernetes_deployment |
|
| Kubernetes Deployment v1 | kubernetes_deployment_v1 |
|
| Kubernetes Job | kubernetes_job |
|
| Kubernetes Job v1 | kubernetes_job_v1 |
|
| Kubernetes Pod | kubernetes_pod |
|
| Kubernetes Pod v1 | kubernetes_pod_v1 |
|
| Kubernetes Replication Controller | kubernetes_replication_controller |
|
| Kubernetes Replication Controller v1 | kubernetes_replication_controller_v1 |
|
| Kubernetes StatefulSet | kubernetes_stateful_set |
|
| Kubernetes StatefulSet v1 | kubernetes_stateful_set_v1 |
| Data Source | depType |
Notes |
|---|---|---|
| Docker registry image | docker_registry_image |
If you need to change the versioning format, read the versioning documentation to learn more.