Use this resource to create a hosted docker repository.
resource "nexus_repository_docker_hosted" "example" {
name = "example"
online = true
docker {
force_basic_auth = false
v1_enabled = false
subdomain = "docker" # Pro-only
}
storage {
blob_store_name = "default"
strict_content_type_validation = true
write_policy = "ALLOW"
}
}
docker
(Block List, Min: 1, Max: 1) docker contains the configuration of the docker repository (see below for nested schema)name
(String) A unique identifier for this repositorystorage
(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)component
(Block List, Max: 1) Component configuration for the hosted repository (see below for nested schema)online
(Boolean) Whether this repository accepts incoming requestsid
(String) Used to identify resource at nexusdocker
Required:
force_basic_auth
(Boolean) Whether to force authentication (Docker Bearer Token Realm required if false)v1_enabled
(Boolean) Whether to allow clients to use the V1 API to interact with this repositoryOptional:
http_port
(Number) Create an HTTP connector at specified porthttps_port
(Number) Create an HTTPS connector at specified portsubdomain
(String) Pro-only: Whether to allow clients to use subdomain routing connectorstorage
Required:
blob_store_name
(String) Blob store used to store repository contentsstrict_content_type_validation
(Boolean) Whether to validate uploaded content's MIME type appropriate for the repository formatOptional:
write_policy
(String) Controls if deployments of and updates to assets are allowedcleanup
Optional:
policy_names
(Set of String) List of policy namescomponent
Required:
proprietary_components
(Boolean) Components in this repository count as proprietary for namespace conflict attacks (requires Sonatype Nexus Firewall)
Import is supported using the following syntax:
# import using the name of repository
terraform import nexus_repository_docker_hosted.example example