entrepot_repository_signing_key
Imports your own OpenPGP private key as the signing key of a hosted apt or yum repository (by default the server generates one on first use). The repository metadata is re-signed with the imported key.
Drift: the private key is write-only. The provider computes the key’s fingerprint locally and compares it with the server’s active key on every refresh; if the key was rotated or replaced outside Terraform, the plan shows a fingerprint change and applying it imports the configured key again.
Destroy rotates the key: the server replaces the imported key with a freshly generated one (a repository always has a signing key), so clients must fetch the new public key.
The private key (and passphrase) are stored in the Terraform state; protect it accordingly.
Example Usage
Section titled “Example Usage”resource "entrepot_repository" "apt" { name = "apt-internal" format = "apt" kind = "hosted" blob_store = "default"}
# Sign the repository with your own key instead of a server-generated one:# gpg --armor --export-secret-keys <key-id> > signing-key.ascresource "entrepot_repository_signing_key" "apt" { repository = entrepot_repository.apt.name private_key = file("${path.module}/signing-key.asc") passphrase = var.signing_key_passphrase}
variable "signing_key_passphrase" { type = string sensitive = true default = null}
output "apt_key_fingerprint" { value = entrepot_repository_signing_key.apt.fingerprint}Schema
Section titled “Schema”Required
Section titled “Required”private_key(String, Sensitive) ASCII-armored OpenPGP private key (gpg --armor --export-secret-keys <id>) containing exactly one key with a usable signing (sub)key. Write-only: changes on the server are detected throughfingerprint. Null after import until the next apply records it.repository(String) Name of a hostedaptoryumrepository. Changing it forces a new resource.
Optional
Section titled “Optional”passphrase(String, Sensitive) Passphrase of a protected private key. The server stores the key decrypted (sealed with its secrets key), so changing only the passphrase makes no API call.
Read-Only
Section titled “Read-Only”algorithm(String) Key algorithm, e.g.rsa4096ored25519.created_at(String) When the active key was imported or generated (RFC 3339).fingerprint(String) Fingerprint (upper-case hex) of the repository’s active key.id(String) Same asrepository.public_key(String) ASCII-armored public key to install on clients.url(String) URL from which clients download the public key.
Import
Section titled “Import”The terraform import command can be used, for example:
# Signing keys are imported by repository name. The private key cannot be# read back: the next apply records the configured key (no API call when it# matches the active key's fingerprint).terraform import entrepot_repository_signing_key.apt apt-internalResource documentation generated from the provider’s schema (docs/resources/repository_signing_key.md in terraform-provider-entrepot).