refactor: parameterise rancher api_url and pin rancher2 to ~> 14.0 #7

Merged
benvin merged 1 commits from benvin/provider-plumbing into main 2026-08-30 14:22:45 +10:00
Member

Why

Provider plumbing hardening ahead of scope expansion.

  • api_url was hardcoded to the derived environment URL, so CI had no way to aim a plan at a different endpoint.
  • rancher2 >= 5.0.0 permits nine majors of drift; the lockfile already resolves 14.1.1.

How

  • environments/root.hcl: generated variable "rancher_url" whose default is the same https://${path_relative_to_include()} expression; the provider now reads var.rancher_url. Default behaviour is unchanged — this only adds a TF_VAR_rancher_url escape hatch. Mirrors terraform-authentik's authentik_url.
  • modules/rancher/versions.tf: pin rancher/rancher2 to ~> 14.0.

uvx pre-commit run --all-files passes (tofu fmt/validate, tflint, terragrunt hcl fmt, yamllint).

## Why Provider plumbing hardening ahead of scope expansion. - `api_url` was hardcoded to the derived environment URL, so CI had no way to aim a plan at a different endpoint. - `rancher2 >= 5.0.0` permits nine majors of drift; the lockfile already resolves 14.1.1. ## How - `environments/root.hcl`: generated `variable "rancher_url"` whose default is the same `https://${path_relative_to_include()}` expression; the provider now reads `var.rancher_url`. Default behaviour is unchanged — this only adds a `TF_VAR_rancher_url` escape hatch. Mirrors `terraform-authentik`'s `authentik_url`. - `modules/rancher/versions.tf`: pin `rancher/rancher2` to `~> 14.0`. `uvx pre-commit run --all-files` passes (tofu fmt/validate, tflint, terragrunt hcl fmt, yamllint).
unkin-agent added 1 commit 2026-08-30 00:46:04 +10:00
refactor: parameterise rancher api_url and pin rancher2 to ~> 14.0
ci/woodpecker/pr/plan Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
b315698634
The provider api_url was hardcoded to the derived environment URL, leaving CI
no way to point a plan at a different endpoint. The rancher2 constraint of
>= 5.0.0 also permitted nine majors of drift against the 14.1.1 the lockfile
resolves.

- Add a generated variable "rancher_url" defaulting to the same
  https://${path_relative_to_include()} expression; the provider now reads
  var.rancher_url, so TF_VAR_rancher_url overrides without changing defaults.
- Pin rancher/rancher2 to ~> 14.0 in modules/rancher/versions.tf.
benvin merged commit bb64931de7 into main 2026-08-30 14:22:45 +10:00
benvin deleted branch benvin/provider-plumbing 2026-08-30 14:22:45 +10:00
Sign in to join this conversation.