forked from ops/terraform-provider-tor
Implement the tor_family_identity resource
This commit is contained in:
parent
0951242b32
commit
ec57a47ba2
22 changed files with 558 additions and 67 deletions
44
e2e-tests/tor-family/main.tf
Normal file
44
e2e-tests/tor-family/main.tf
Normal file
|
@ -0,0 +1,44 @@
|
|||
terraform {
|
||||
required_providers {
|
||||
tor = {
|
||||
source = "guardianproject/tor"
|
||||
version = "99.0.0"
|
||||
}
|
||||
local = {
|
||||
source = "hashicorp/local"
|
||||
version = "2.5.3"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
provider "tor" {}
|
||||
|
||||
resource "tor_family_identity" "this" {
|
||||
family_name = "MyFamily"
|
||||
}
|
||||
|
||||
resource "local_sensitive_file" "family_key" {
|
||||
content_base64 = tor_family_identity.this.secret_key
|
||||
filename = "./data/keys/MyKey.secret_family_key"
|
||||
file_permission = "0600"
|
||||
}
|
||||
|
||||
resource "local_file" "this" {
|
||||
filename = "./torrc"
|
||||
content = <<EOF
|
||||
FamilyId ${tor_family_identity.this.id}
|
||||
BridgeRelay 1
|
||||
DataDirectory data
|
||||
ORPort 3333
|
||||
ServerTransportListenAddr obfs4 0.0.0.0:3334
|
||||
ExtORPort auto
|
||||
ContactInfo <address@email.com>
|
||||
Nickname PickANickname
|
||||
EOF
|
||||
}
|
||||
|
||||
|
||||
output "family_id" {
|
||||
description = "Family ID for the bridge"
|
||||
value = tor_family_identity.this.id
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue