Use this resource to create an NPM proxy repository.
resource "nexus_repository_pypi_proxy" "pypi_org" {
name = "pypi-org"
online = true
storage {
blob_store_name = "default"
strict_content_type_validation = true
}
proxy {
remote_url = "https://pypi.org"
content_max_age = 1440
metadata_max_age = 1440
}
negative_cache {
enabled = true
ttl = 1440
}
http_client {
blocked = false
auto_block = true
}
}
http_client
(Block List, Min: 1, Max: 1) HTTP Client configuration for proxy repositories (see below for nested schema)name
(String) A unique identifier for this repositoryproxy
(Block List, Min: 1, Max: 1) Configuration for the proxy repository (see below for nested schema)storage
(Block List, Min: 1, Max: 1) The storage configuration of the repository (see below for nested schema)cleanup
(Block List) Cleanup policies (see below for nested schema)negative_cache
(Block List, Max: 1) Configuration of the negative cache handling (see below for nested schema)online
(Boolean) Whether this repository accepts incoming requestsrouting_rule
(String) The name of the routing rule assigned to this repositoryid
(String) Used to identify resource at nexushttp_client
Required:
auto_block
(Boolean) Whether to auto-block outbound connections if remote peer is detected as unreachable/unresponsiveblocked
(Boolean) Whether to block outbound connections on the repositoryOptional:
authentication
(Block List, Max: 1) Authentication configuration of the HTTP client (see below for nested schema)connection
(Block List, Max: 1) Connection configuration of the HTTP client (see below for nested schema)http_client.authentication
Required:
type
(String) Authentication type. Possible values: ntlm
or username
Optional:
ntlm_domain
(String) The ntlm domain to connectntlm_host
(String) The ntlm host to connectpassword
(String, Sensitive) The password used by the proxy repositoryusername
(String) The username used by the proxy repositoryhttp_client.connection
Optional:
enable_circular_redirects
(Boolean) Whether to enable redirects to the same location (may be required by some servers)enable_cookies
(Boolean) Whether to allow cookies to be stored and usedretries
(Number) Total retries if the initial connection attempt suffers a timeouttimeout
(Number) Seconds to wait for activity before stopping and retrying the connectionuse_trust_store
(Boolean) Use certificates stored in the Nexus Repository Manager truststore to connect to external systemsuser_agent_suffix
(String) Custom fragment to append to User-Agent header in HTTP requestsproxy
Required:
remote_url
(String) Location of the remote repository being proxiedOptional:
content_max_age
(Number) How long (in minutes) to cache artifacts before rechecking the remote repositorymetadata_max_age
(Number) How long (in minutes) to cache metadata before rechecking the remote repository.storage
Required:
blob_store_name
(String) Blob store used to store repository contentsOptional:
strict_content_type_validation
(Boolean) Whether to validate uploaded content's MIME type appropriate for the repository formatcleanup
Optional:
policy_names
(Set of String) List of policy namesnegative_cache
Optional:
enabled
(Boolean) Whether to cache responses for content not present in the proxied repositoryttl
(Number) How long to cache the fact that a file was not found in the repository (in minutes)
Import is supported using the following syntax:
# import using the name of repository
terraform import nexus_repository_pypi_proxy.pypi_org pypi-org