Use this resource to create a hosted Npm repository.
resource "nexus_repository_npm_hosted" "npm" {
name = "npm"
}
resource "nexus_repository_npm_hosted" "npm1" {
name = "npm1"
online = true
cleanup {
policy_names = ["policy"]
}
storage {
blob_store_name = "default"
strict_content_type_validation = true
write_policy = "ALLOW"
}
}
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 nexusstorage
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_npm_hosted.npm npm