2025-06-03 13:23:45 +02:00
|
|
|
---
|
|
|
|
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
|
|
|
page_title: "tor_relay_identity_rsa Resource - tor"
|
|
|
|
subcategory: ""
|
|
|
|
description: |-
|
|
|
|
Generates 1024-bit RSA private key for Tor relay identity as required by the Tor specification.
|
|
|
|
---
|
|
|
|
|
|
|
|
# tor_relay_identity_rsa (Resource)
|
|
|
|
|
|
|
|
Generates 1024-bit RSA private key for Tor relay identity as required by the Tor specification.
|
|
|
|
|
2025-06-03 13:33:14 +02:00
|
|
|
## Example Usage
|
2025-06-03 13:23:45 +02:00
|
|
|
|
2025-06-03 13:33:14 +02:00
|
|
|
```terraform
|
|
|
|
# Copyright (c) Abel Luck <abel@guardianproject.info>
|
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
|
|
|
terraform {
|
|
|
|
required_providers {
|
|
|
|
tor = {
|
|
|
|
source = "guardianproject/tor"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
provider "tor" {}
|
|
|
|
|
|
|
|
# Example: Generate RSA identity key for Tor relay
|
|
|
|
resource "tor_relay_identity_rsa" "example" {
|
|
|
|
key_size = 2048 # Default RSA key size for Tor relays
|
|
|
|
}
|
|
|
|
|
|
|
|
output "private_key_pem" {
|
|
|
|
description = "RSA private key in PEM format"
|
|
|
|
value = tor_relay_identity_rsa.example.private_key_pem
|
|
|
|
sensitive = true
|
|
|
|
}
|
|
|
|
|
|
|
|
output "public_key_pem" {
|
|
|
|
description = "RSA public key in PEM format"
|
|
|
|
value = tor_relay_identity_rsa.example.public_key_pem
|
|
|
|
}
|
|
|
|
|
|
|
|
output "public_key_fingerprint_sha1" {
|
|
|
|
description = "SHA1 fingerprint of the RSA public key"
|
|
|
|
value = tor_relay_identity_rsa.example.public_key_fingerprint_sha1
|
|
|
|
}
|
|
|
|
|
|
|
|
output "public_key_fingerprint_sha256" {
|
|
|
|
description = "SHA256 fingerprint of the RSA public key"
|
|
|
|
value = tor_relay_identity_rsa.example.public_key_fingerprint_sha256
|
|
|
|
}
|
|
|
|
```
|
2025-06-03 13:23:45 +02:00
|
|
|
|
|
|
|
<!-- schema generated by tfplugindocs -->
|
|
|
|
## Schema
|
|
|
|
|
|
|
|
### Read-Only
|
|
|
|
|
|
|
|
- `algorithm` (String) Name of the algorithm used when generating the private key (always 'RSA')
|
|
|
|
- `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_sha1` (String) SHA1 fingerprint of the public key in hex 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
|