82 lines
4.0 KiB
Markdown
82 lines
4.0 KiB
Markdown
---
|
|
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
|
page_title: "artifactapi_remote_docker Resource - artifactapi"
|
|
subcategory: ""
|
|
description: |-
|
|
Manages an ArtifactAPI docker remote, a caching proxy for an upstream repository. Tag manifests are mutable and blobs are immutable; ban_tags blocks specific tags.
|
|
---
|
|
|
|
# artifactapi_remote_docker (Resource)
|
|
|
|
Manages an ArtifactAPI docker remote, a caching proxy for an upstream repository. Tag manifests are mutable and blobs are immutable; `ban_tags` blocks specific tags.
|
|
|
|
## Example Usage
|
|
|
|
```terraform
|
|
# Docker remote proxies a container registry.
|
|
# The provider auto-classifies: tag manifests are mutable, blobs are immutable.
|
|
resource "artifactapi_remote_docker" "dockerhub" {
|
|
name = "dockerhub"
|
|
base_url = "https://registry-1.docker.io"
|
|
description = "Docker Hub registry"
|
|
|
|
immutable_ttl = 0
|
|
mutable_ttl = 300
|
|
ban_tags_enabled = true
|
|
ban_tags = ["latest"]
|
|
|
|
patterns = [
|
|
"^library/almalinux",
|
|
"^library/postgres",
|
|
"^library/redis",
|
|
"^bitnami/",
|
|
]
|
|
}
|
|
```
|
|
|
|
<!-- schema generated by tfplugindocs -->
|
|
## Schema
|
|
|
|
### Required
|
|
|
|
- `base_url` (String) Upstream repository base URL.
|
|
- `name` (String) Unique name of the remote.
|
|
|
|
### Optional
|
|
|
|
- `ban_tags` (List of String) Tags to ban (docker only).
|
|
- `ban_tags_enabled` (Boolean) Enable tag banning (docker only).
|
|
- `blocklist` (List of String) Paths to always deny (checked before patterns).
|
|
- `cache_repodata` (Boolean) Cache generated repodata (github_rpm only).
|
|
- `check_mutable` (Boolean) Enable conditional revalidation for mutable artifacts.
|
|
- `description` (String) Human-readable description.
|
|
- `immutable_patterns` (List of String) Override: paths that should be immutable even if the provider would classify as mutable.
|
|
- `immutable_ttl` (Number) TTL in seconds for immutable artifacts (0 = forever).
|
|
- `mirror_strategy` (String) Mirror load-balancing strategy across base_url + mirrorlist; only valid on remote rpm/deb/apk (alpine) repos. One of "round_robin" (default) or "least_conn".
|
|
- `mirrorlist` (List of String) Extra upstream mirror base URLs; only valid on remote rpm/deb/apk (alpine) repos. Requests are load-balanced with failover across base_url + mirrorlist.
|
|
- `mutable_patterns` (List of String) Override: paths that should be mutable even if the provider would classify as immutable.
|
|
- `mutable_ttl` (Number) TTL in seconds for mutable artifacts.
|
|
- `password` (String, Sensitive) Password or token for upstream authentication.
|
|
- `patterns` (List of String) Paths to proxy (empty = all). This is the allowlist.
|
|
- `quarantine_days` (Number) Days to quarantine new artifacts when `quarantine_enabled` is set.
|
|
- `quarantine_enabled` (Boolean) Hold newly published upstream artifacts back until they are `quarantine_days` old.
|
|
- `releases_remote` (String) Name of a backend remote that serves the actual download bytes. Used by the terraform remote (download URL rewriting) and the github_rpm/github_deb/github_alpine remotes (302 redirect of .rpm/.deb/.apk downloads to a generic github.com remote).
|
|
- `serve_stale` (Boolean) Let rpm/deb/alpine virtuals serve this member's last good index while it refreshes.
|
|
- `stale_on_error` (Boolean) Serve stale cached content when upstream is unreachable.
|
|
- `sync_interval` (Number) Release re-scan interval in seconds, 0..2592000 (0 = mutable_ttl); github_rpm/github_deb/github_alpine only.
|
|
- `upstream_dial_timeout` (Number) Upstream TCP connect timeout in seconds (0 = server default).
|
|
- `upstream_response_header_timeout` (Number) Upstream response-header timeout in seconds (0 = server default).
|
|
- `upstream_tls_timeout` (Number) Upstream TLS handshake timeout in seconds (0 = server default).
|
|
- `username` (String, Sensitive) Username for upstream authentication.
|
|
|
|
## Import
|
|
|
|
Import is supported using the following syntax:
|
|
|
|
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
|
|
|
|
```shell
|
|
# Import by name.
|
|
terraform import artifactapi_remote_docker.dockerhub dockerhub
|
|
```
|