> For the complete documentation index, see [llms.txt](https://docs.terrakube.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.terrakube.io/2.34.0/reference/configuration/registry.md).

# Registry

Environment variables of the Terrakube **Registry**. See [Configuration Reference](/2.34.0/reference/configuration.md) for how to set them. An empty default means the variable has no default: either it is optional or it must be provided.

### /.well-known/terraform.json Data

| Variable                | Default | Description                                        |
| ----------------------- | ------- | -------------------------------------------------- |
| `AzBuilderRegistry`     |         | Sets `io.terrakube.registry.hostname`.             |
| `AppClientId`           |         | Sets `io.terrakube.registry.clientId`.             |
| `AppIssuerUri`          |         | Sets `io.terrakube.registry.issuerUri`.            |
| `TerraformLoginEnabled` | `false` | Sets `io.terrakube.registry.login-broker-enabled`. |
| `TerraformLoginApiUrl`  |         | Sets `io.terrakube.registry.login-api-url`.        |

### Authentication Type

| Variable                               | Default | Description                                       |
| -------------------------------------- | ------- | ------------------------------------------------- |
| `AuthenticationValidationTypeRegistry` |         | Sets `io.terrakube.registry.authentication.type`. |

### Terrakube Client

| Variable                  | Default | Description                                |
| ------------------------- | ------- | ------------------------------------------ |
| `TerrakubeEnableSecurity` |         | Sets `io.terrakube.client.enableSecurity`. |
| `AzBuilderApiUrl`         |         | Sets `io.terrakube.client.url`.            |
| `InternalSecret`          |         | Sets `io.terrakube.client.secretKey`.      |

### Storage Service

| Variable              | Default | Description                                       |
| --------------------- | ------- | ------------------------------------------------- |
| `RegistryStorageType` |         | Sets `io.terrakube.registry.plugin.storage.type`. |

### AZURE Storage

| Variable                             | Default | Description                                                                                                                                         |
| ------------------------------------ | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| `AzureAccountName`                   |         | Sets `io.terrakube.registry.plugin.storage.azure.accountName`.                                                                                      |
| `AzureAccountKey`                    |         | Sets `io.terrakube.registry.plugin.storage.azure.accountKey`.                                                                                       |
| `AzureBlobPresignedUrlExpirySeconds` | `300`   | Azure Blob module.zip presigned SAS redirect - off by default for staged rollout; also the rollback switch back to the registry proxying ZIP bytes. |
| `AzureBlobPresignedRedirectEnabled`  | `false` | Sets `io.terrakube.registry.plugin.storage.azure.presignedRedirectEnabled`.                                                                         |

### AWS Storage

| Variable                                   | Default | Description                                                                                                                                                                            |
| ------------------------------------------ | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `AwsStorageAccessKey`                      |         | Sets `io.terrakube.registry.plugin.storage.aws.accessKey`.                                                                                                                             |
| `AwsStorageSecretKey`                      |         | Sets `io.terrakube.registry.plugin.storage.aws.secretKey`.                                                                                                                             |
| `AwsStorageBucketName`                     |         | Sets `io.terrakube.registry.plugin.storage.aws.bucketName`.                                                                                                                            |
| `AwsStorageRegion`                         |         | Sets `io.terrakube.registry.plugin.storage.aws.region`.                                                                                                                                |
| `AwsEndpoint`                              |         | Sets `io.terrakube.registry.plugin.storage.aws.endpoint`.                                                                                                                              |
| `AwsEnableRoleAuth`                        | `false` | Sets `io.terrakube.registry.plugin.storage.aws.enableRoleAuthentication`.                                                                                                              |
| `AwsEndpointRegion`                        | `auto`  | S3-compatible backends (Qumulo, MinIO, ...) that need a real signing region or no chunked/checksum support                                                                             |
| `AwsPathStyleAccess`                       | `true`  | Sets `io.terrakube.registry.plugin.storage.aws.pathStyleAccessEnabled`.                                                                                                                |
| `AwsChunkedEncodingEnabled`                | `true`  | Sets `io.terrakube.registry.plugin.storage.aws.chunkedEncodingEnabled`.                                                                                                                |
| `AwsChecksumValidationEnabled`             | `true`  | Sets `io.terrakube.registry.plugin.storage.aws.checksumValidationEnabled`.                                                                                                             |
| `AwsS3ConnectionAcquisitionTimeoutSeconds` | `1`     | S3Client/S3Presigner HTTP client bounds - fail fast rather than queue request threads against a slow or unreachable S3 endpoint. Defaults match the module-download resilience design. |
| `AwsS3ConnectTimeoutSeconds`               | `2`     | Sets `io.terrakube.registry.plugin.storage.aws.connectTimeoutSeconds`.                                                                                                                 |
| `AwsS3SocketTimeoutSeconds`                | `10`    | Sets `io.terrakube.registry.plugin.storage.aws.socketTimeoutSeconds`.                                                                                                                  |
| `AwsS3ApiCallAttemptTimeoutSeconds`        | `15`    | Sets `io.terrakube.registry.plugin.storage.aws.apiCallAttemptTimeoutSeconds`.                                                                                                          |
| `AwsS3ApiCallTimeoutSeconds`               | `25`    | Sets `io.terrakube.registry.plugin.storage.aws.apiCallTimeoutSeconds`.                                                                                                                 |
| `AwsS3MaxConnections`                      | `50`    | Sets `io.terrakube.registry.plugin.storage.aws.maxConnections`.                                                                                                                        |
| `AwsS3PresignedUrlExpirySeconds`           | `300`   | module.zip presigned redirect - off by default for staged rollout; also the rollback switch back to the registry proxying ZIP bytes.                                                   |
| `AwsS3PresignedRedirectEnabled`            | `false` | Sets `io.terrakube.registry.plugin.storage.aws.presignedRedirectEnabled`.                                                                                                              |

### GCP Storage

| Variable                       | Default | Description                                                                                                                                                                                                                             |
| ------------------------------ | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `GcpStorageCredentialsBase64`  |         | Sets `io.terrakube.registry.plugin.storage.gcp.credentials`.                                                                                                                                                                            |
| `GcpStorageBucketName`         |         | Sets `io.terrakube.registry.plugin.storage.gcp.bucketName`.                                                                                                                                                                             |
| `GcpStorageProjectId`          |         | Sets `io.terrakube.registry.plugin.storage.gcp.projectId`.                                                                                                                                                                              |
| `GcpPresignedUrlExpirySeconds` | `300`   | GCP Cloud Storage module.zip V4-signed URL redirect - off by default for staged rollout; also the rollback switch back to the registry proxying ZIP bytes. Requires iam.serviceAccounts.signBlob IAM permission on the service account. |
| `GcpPresignedRedirectEnabled`  | `false` | Sets `io.terrakube.registry.plugin.storage.gcp.presignedRedirectEnabled`.                                                                                                                                                               |

### Cors

| Variable         | Default | Description                  |
| ---------------- | ------- | ---------------------------- |
| `TerrakubeUiURL` |         | Sets `io.terrakube.ui.fqdn`. |

### DEX AUTHENTICATION

| Variable       | Default | Description                           |
| -------------- | ------- | ------------------------------------- |
| `PatSecret`    |         | Sets `io.terrakube.token.pat`.        |
| `DexIssuerUri` |         | Sets `io.terrakube.token.issuer-uri`. |

### CACHE FEDERATED AUTHENTICATION

| Variable                               | Default | Description                                                        |
| -------------------------------------- | ------- | ------------------------------------------------------------------ |
| `FederatedCacheExpireAfterWrite`       | `10`    | Sets `io.terrakube.registry.federatedCacheExpireAfterWrite`.       |
| `FederatedCacheMaximumSize`            | `1000`  | Sets `io.terrakube.registry.federatedCacheMaximumSize`.            |
| `ProviderManagerCacheExpireAfterWrite` | `60`    | Sets `io.terrakube.registry.providerManagerCacheExpireAfterWrite`. |
| `ProviderManagerCacheMaximumSize`      | `100`   | Sets `io.terrakube.registry.providerManagerCacheMaximumSize`.      |

### MODULE REGISTRY CACHE

| Variable                        | Default | Description                                                                                                                                                                       |
| ------------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ModuleVersionsCacheTtlSeconds` | `600`   | Time to live of the module version list. This is the delay between the API storing a new module version and the registry serving it, so lower it when modules are released often. |

### DOWNLOAD COUNT UPDATE

| Variable                             | Default | Description                                                                                                                                                          |
| ------------------------------------ | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `DownloadCountExecutorCorePoolSize`  | `2`     | Bounded pool for the best-effort download-count bookkeeping call, kept off the Terraform-facing metadata response's critical path - see DownloadCountExecutorConfig. |
| `DownloadCountExecutorMaxPoolSize`   | `5`     | Sets `io.terrakube.registry.download-count.executor.maxPoolSize`.                                                                                                    |
| `DownloadCountExecutorQueueCapacity` | `200`   | Sets `io.terrakube.registry.download-count.executor.queueCapacity`.                                                                                                  |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.terrakube.io/2.34.0/reference/configuration/registry.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
