entrepot_repository
A repository: hosted (you publish to it), proxy (pull-through cache of an upstream) or group (an ordered union of repositories of the same format).
Example Usage
Section titled “Example Usage”# Pull-through cache of the public npm registry.resource "entrepot_repository" "npmjs" { name = "npmjs" format = "npm" kind = "proxy" blob_store = "default" anonymous_read = true proxy = { remote_url = "https://registry.npmjs.org" routing_rule = "internal-names" # never fetch @acme/* from the public registry } scan = { scanners = ["trivy"] mode = "quarantine" severity_threshold = "high" }}
# Internal packages, published by CI.resource "entrepot_repository" "npm_internal" { name = "npm-internal" format = "npm" kind = "hosted" blob_store = "default" cleanup_policies = ["prune-prereleases"]
lifecycle { prevent_destroy = true # replacing a repository deletes its content }}
# One URL for clients: internal packages first, then npmjs.resource "entrepot_repository" "npm" { name = "npm" format = "npm" kind = "group" blob_store = "default" group = { members = [entrepot_repository.npm_internal.name, entrepot_repository.npmjs.name] prefer_hosted = true # dependency-confusion protection }}
# A signed Apt repository with two distributions.resource "entrepot_repository" "apt" { name = "apt-internal" format = "apt" kind = "hosted" blob_store = "default" hosted = { apt = { distributions = [ { name = "bookworm", components = ["main"], architectures = ["amd64", "arm64", "all"] }, { name = "noble", components = ["main"], architectures = ["amd64", "all"] }, ] } }}Schema
Section titled “Schema”Required
Section titled “Required”blob_store(String) Blob store for the repository’s content. Changing it forces a new repository (content is not migrated).format(String) One ofraw,pypi,npm,docker,apt,yum,helm. Changing it forces a new repository.kind(String)hosted,proxyorgroup. Changing it forces a new repository.name(String) Repository name (part of client URLs). Changing it forces a new repository.
Optional
Section titled “Optional”anonymous_read(Boolean) Allow unauthenticated reads.cleanup_policies(List of String) Names ofentrepot_cleanup_policys applied to the repository.description(String)group(Attributes) Required forkind = "group". (see below for nested schema)hosted(Attributes) Settings forkind = "hosted". (see below for nested schema)online(Boolean) Offline proxies serve only cached content.proxy(Attributes) Required forkind = "proxy". (see below for nested schema)scan(Attributes) Vulnerability scanning policy. (see below for nested schema)
Read-Only
Section titled “Read-Only”id(String) Same asname.url(String) URL to configure package clients with.
Nested Schema for group
Section titled “Nested Schema for group”Required:
members(List of String) Member repositories, searched in order.
Optional:
prefer_hosted(Boolean) npm/PyPI/Helm: never serve a package name from proxy members when a hosted member has it (dependency-confusion protection). Server default: true.
Nested Schema for hosted
Section titled “Nested Schema for hosted”Optional:
allow_redeploy(Boolean) Allow overwriting existing versions (for Docker: moving tags). Server default: false, true for Docker.apt(Attributes) Apt distributions to publish. (see below for nested schema)yum(Attributes) Yum repodata settings. (see below for nested schema)
Nested Schema for hosted.apt
Section titled “Nested Schema for hosted.apt”Optional:
distributions(Attributes List) (see below for nested schema)
Nested Schema for hosted.apt.distributions
Section titled “Nested Schema for hosted.apt.distributions”Required:
name(String) e.g.stable,bookworm.
Optional:
architectures(List of String) Architectures, e.g.amd64,arm64,all.components(List of String) Components (defaultmain).label(String)origin(String)
Nested Schema for hosted.yum
Section titled “Nested Schema for hosted.yum”Optional:
repodata_depth(Number) Directory depth at which repodata is generated (0 = root).
Nested Schema for proxy
Section titled “Nested Schema for proxy”Required:
remote_url(String) Upstream URL, e.g.https://registry.npmjs.org.
Optional:
content_ttl_seconds(Number) Cache time for artifacts (default: never expire).metadata_ttl_seconds(Number) Cache time for indexes/metadata (server default 3600).negative_cache_ttl_seconds(Number) Cache time for upstream 404s (server default 300, -1 disables).password(String, Sensitive) Write-only: never returned by the API, so changes made outside Terraform are not detected.routing_rule(String) Name of anentrepot_routing_rulerestricting what is fetched upstream.username(String)
Nested Schema for scan
Section titled “Nested Schema for scan”Optional:
block_until_scanned(Boolean)distro(String) Apt/Yum: distribution for vulnerability matching, e.g.debian-12,rocky-9.mode(String)off,warn(record findings) orquarantine(block downloads). Server default: warn.on_proxy_fetch(Boolean)on_upload(Boolean)scanners(List of String) Names ofentrepot_scanners to run.severity_threshold(String) Lowest severity that quarantines. Server default: high.
Import
Section titled “Import”The terraform import command can be used, for example:
# Repositories are imported by name.terraform import entrepot_repository.npm_internal npm-internalResource documentation generated from the provider’s schema (docs/resources/repository.md in terraform-provider-entrepot).