feat: add Terraform/OpenTofu registry remote type #45
Reference in New Issue
Block a user
Delete Branch "feat/terraform-registry-remote"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
terraformpackage type implementing the Terraform Registry Protocolconstruct_urlprepends/v1/providers/so paths likehashicorp/vault/versionsmap toregistry.terraform.io/v1/providers/hashicorp/vault/versionsresolve_contentrewritesdownload_url,shasums_url, andshasums_signature_urlin per-version download info JSON to route through a companionreleases_remote(generic remote proxyingreleases.hashicorp.com){namespace}/{type}/versions— version lists expire and are re-fetched; per-version download info is immutable.terraformrc/.tofurchost block — no changes to.tfprovider source addresses neededTest plan
construct_urlcorrectness, and cache miss behaviourhashicorp/vault v4.5.0through docker-compose stack —tofu initsucceeded, provider installed and signeddownload_url/shasums_urlrewritten tohashicorp-releasesproxy in cached responseImplements the Terraform Registry Protocol as a proxy remote type so Terraform and OpenTofu can pull providers through the caching layer without changing provider source addresses. - New `terraform` package type with `construct_url` (prepends `/v1/providers/`) and `resolve_content` (rewrites `download_url`, `shasums_url`, `shasums_signature_url` to route through a companion `releases_remote`) - Built-in mutable pattern for provider version lists (`{ns}/{type}/versions`) - `releases_remote` config option links the registry remote to a separate generic remote proxying the release CDN - Client config: `.terraformrc` / `.tofurc` host block redirects `registry.terraform.io` to the proxy without touching `.tf` files - 8 unit tests + end-to-end test (OpenTofu 1.10 pulling hashicorp/vault 4.5.0 through docker-compose stack) - Example config and README section added8fc9b179a6to43927a7666