Terraform & OpenTofu provider
The entrepotproj/entrepot provider configures an Entrepot server through
its management API, so your package platform is reviewed, versioned and
reproducible like the rest of your infrastructure. It works with
Terraform ≥ 1.5 and OpenTofu ≥ 1.8, from both
registry.terraform.io and registry.opentofu.org.
terraform { required_providers { entrepot = { source = "entrepotproj/entrepot" version = "~> 0.1" } }}
# The token comes from ENTREPOT_TOKEN.provider "entrepot" { url = "https://entrepot.example.com" # or ENTREPOT_URL}
resource "entrepot_repository" "npmjs" { name = "npmjs" format = "npm" kind = "proxy" blob_store = "default" anonymous_read = true proxy = { remote_url = "https://registry.npmjs.org" }}
output "npm_registry" { value = entrepot_repository.npmjs.url}What it manages
Section titled “What it manages”| Area | Resources | Data sources |
|---|---|---|
| Storage | entrepot_blob_store |
entrepot_blob_store |
| Repositories | entrepot_repository |
entrepot_repository, entrepot_repositories |
| Access control | entrepot_role, entrepot_role_binding |
entrepot_role |
| CI federation | entrepot_gitlab_trust_policy |
|
| Machine identities | entrepot_service_account, entrepot_service_account_token |
|
| Scanning | entrepot_scanner, entrepot_waiver |
|
| Hygiene | entrepot_cleanup_policy, entrepot_routing_rule |
|
| Signing | entrepot_repository_signing_key |
entrepot_signing_key |
| Server | entrepot_system_info |
Every resource supports terraform import.
What stays in server configuration
Section titled “What stays in server configuration”Some settings are deliberately not API objects, because they decide whom
the server trusts. Set them in the server configuration or Helm values:
OIDC (auth.oidc), trusted GitLab instances (auth.gitlab), admin groups,
the session secret and the secrets key. Blob stores declared in
blobStores are created at startup; you can also manage additional stores
with Terraform.
Install & configureBoth registries, required_providers, credentials.
Platform exampleEvery format, groups, SSO bindings, GitLab CI, scanning, cleanup.
Tips & behaviourWrite-only secrets, forced replacement, imports.
Resource referenceArguments, attributes and import for each resource.