Use this resource to create a hosted maven repository.
resource "nexus_repository_maven_hosted" "releases" {
name = "maven-releases"
online = true
storage {
blob_store_name = "default"
strict_content_type_validation = false
write_policy = "ALLOW"
}
maven {
version_policy = "RELEASE"
layout_policy = "STRICT"
content_disposition = "INLINE"
}
}
maven
(Block List, Min: 1, Max: 1) Maven contains additional data of maven 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 nexusmaven
Required:
layout_policy
(String) Validate that all paths are maven artifact or metadata paths. Possible Value: STRICT
or PERMISSIVE
version_policy
(String) What type of artifacts does this repository store? Possible Value: RELEASE
, SNAPSHOT
or MIXED
Optional:
content_disposition
(String) Add Content-Disposition header as 'Attachment' to disable some content from being inline in a browse. Possible Value: INLINE
or ATTACHMENT
storage
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_maven_hosted.releases maven-releases