Use this resource to create a hosted apt repository.
resource "nexus_repository_apt_hosted" "bullseye_stable" {
name = "bullseye-stable"
online = true
distribution = "bullseye"
signing {
# The passphrase set here will never be returned from the nexus API.
# When reading the resource, the passphrase will be read from the previous state,
# so external changes won't be detected.`,
# If the passphrase is unset or empty, the nexus API will also not return the keypair.
# When reading the resource, the keypair will be read from the previous state in this case,
# so external changes won't be detected.`,
keypair = "keypair"
passphrase = "passphrase"
}
storage {
blob_store_name = "default"
strict_content_type_validation = true
write_policy = "ALLOW"
}
}
distribution
(String) Distribution to fetchname
(String) A unique identifier for this repositorysigning
(Block List, Min: 1, Max: 1) Signing contains signing data of hosted repositores of format Apt (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)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 nexussigning
Required:
keypair
(String, Sensitive) PGP signing key pair (armored private key e.g. gpg --export-secret-key --armor)
If passphrase is unset, the keypair cannot be read from the nexus api.
When reading the resource, the keypair will be read from the previous state,
so external changes won't be detected in this case.Optional:
passphrase
(String, Sensitive) Passphrase to access PGP signing key.
This value cannot be read from the nexus api.
When reading the resource, the value will be read from the previous state,
so external changes won't be detected.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_apt_hosted.bullseye_stable bullseye-stable