terraform-provider-tor/docs/resources/relay_identity_ed25519.md

1.6 KiB

page_title subcategory description
tor_relay_identity_ed25519 Resource - tor Generates Ed25519 private key for Tor relay identity as required by the Tor specification.

tor_relay_identity_ed25519 (Resource)

Generates Ed25519 private key for Tor relay identity as required by the Tor specification.

Example Usage

terraform {
  required_providers {
    tor = {
      source = "guardianproject/tor"
    }
  }
}

provider "tor" {}

# Example: Generate Ed25519 identity key for Tor relay
resource "tor_relay_identity_ed25519" "example" {}

output "private_key_pem" {
  description = "Ed25519 private key in PEM format"
  value       = tor_relay_identity_ed25519.example.private_key_pem
  sensitive   = true
}

output "public_key_pem" {
  description = "Ed25519 public key in PEM format"
  value       = tor_relay_identity_ed25519.example.public_key_pem
}


output "public_key_fingerprint_sha256" {
  description = "SHA256 fingerprint of the Ed25519 public key"
  value       = tor_relay_identity_ed25519.example.public_key_fingerprint_sha256
}

Schema

Read-Only

  • algorithm (String) Name of the algorithm used when generating the private key (always 'Ed25519')
  • id (String) Unique identifier based on public key fingerprint
  • private_key_pem (String, Sensitive) Private key data in PEM (RFC 1421) format
  • public_key_fingerprint_sha256 (String) SHA256 fingerprint of the public key in hex format
  • public_key_pem (String) Public key data in PEM (RFC 1421) format