Terraform module and provider registries
Arka stores archives by module version or provider platform and serves version, download, and checksum metadata. Terraform discovers registry services by HTTPS hostname.
Create repositories
Run these Bash commands with an authenticated administrator arkactl profile and jq. Replace the endpoint and upstream address. Grant the publisher Hosted write access and the consumer read access to Group and the relevant members. For each identity, sign in and run arkactl --json tokens create --name terraform-ci --expires-in-days 30 | jq -er .plaintext. Store each token directly in your secret manager.
export ARKA_URL=https://packages.example.org
hosted=$(arkactl --json repo create --name terraform-hosted --type hosted --format terraform | jq -er .id)
proxy=$(arkactl --json repo create --name terraform-proxy --type proxy --format terraform \
--upstream-url https://registry.terraform.io | jq -er .id)
arkactl repo create --name terraform-group --type group --format terraform --member "$hosted,$proxy"
export WRITE="$ARKA_URL/repository/terraform-hosted"
export READ="$ARKA_URL/repository/terraform-group"Publish a Hosted module or provider
tar -czf network.tar.gz -C modules/network .
curl --fail-with-body -sS -H "Authorization: Bearer $ARKA_WRITE_TOKEN" \
-T network.tar.gz "$WRITE/modules/acme/network/aws/1.2.3/network.tar.gz"
file=terraform-provider-widget_1.2.3_linux_amd64.zip
sha256sum "$file" > SHA256SUMS
for item in "$file" SHA256SUMS; do
curl --fail-with-body -sS -H "Authorization: Bearer $ARKA_WRITE_TOKEN" \
-T "$item" "$WRITE/providers/acme/widget/1.2.3/$item"
donePublish the same complete checksum manifest for all platforms. Before rollout, verify provider signatures, trusted signers, checksum files, and the lockfile. The Wave 3 test uses the official Terraform CLI to verify module resolution.
Configure discovery and authentication
Route GET /.well-known/terraform.json through the HTTPS reverse proxy to the same discovery endpoint on the chosen Arka Group. It returns modules.v1 and providers.v1. Set the advertised service URLs to the public hostname Terraform uses. Terraform namespace, module, and provider path segments omit the Arka repository name. Supply a read token through the CLI credentials block or TF_TOKEN_packages_example_org.
module "network" {
source = "packages.example.org/acme/network/aws"
version = "1.2.3"
}From a clean working directory run terraform init -input=false and terraform validate. For private modules, verify that the archive downloader can use the deployment’s authentication separately. Discovery and archive download are separate HTTP requests. Choose a Proxy upstream that implements the same version endpoints and add Hosted and Proxy as separate Group members in that order.
| Symptom | What to check |
|---|---|
| The host does not offer a module service | Check root discovery, HTTPS CA, service IDs, and returned URLs. |
| Module archive cannot be fetched | Inspect the version and download responses and the X-Terraform-Get URL. Verify the intended Group. |
| Provider install or checksum validation fails | Check OS and architecture, ZIP name, SHA256SUMS, signatures, and .terraform.lock.hcl. |
Terraform module registry protocol · Terraform provider registry protocol