Generates cloud-init user data for a Tor server (relay or bridge) using the latest stable Debian release. It may also work with Debian derivatives but has not been tested with anything other than Debian. You may want to check out the sr2c/torrc and sr2c/contactinfo modules for generating torrc configuration files and ContactInfo Information Sharing Specification lines respectively.
The tor package will be installed from the official Tor Project Debian repository at deb.torproject.org. The signing key for the repository is included in this module.
The obfs4proxy
and nyx
packages can be installed by setting the respective inputs. For obfs4proxy, an apt
preference file is installed to always enable the use of stable backports. This will only work on Debian and on
other derivatives (e.g. Ubuntu) an older version of obfs4proxy would be installed from the available repositories.
Additional packages may also be installed using the additional_packages
input.
The configuration will also change the default congestion control algorithm to BBR as it has been observed to perform better in many of the scenarios where Tor is used. If this is really a problem then please submit an issue and it could be made optional.
module "user_data" {
source = "sr2c/tor/cloudinit"
# TODO: version = "x.x.x"
torrc = <<-EOT
Nickname TerraformRelay
ORPort 9001
ContactInfo email@example.com
EOT
}
Name | Version |
---|---|
terraform | >= 0.15.0 |
cloudinit | >= 2.2.0 |
Name | Version |
---|---|
cloudinit | 2.2.0 |
No modules.
Name | Type |
---|---|
cloudinit_config.this | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
additional_packages | A list of additional packages to be installed using apt. | list(string) | [] | no |
gzip | Compress the final user-data with gzip. | bool | true | no |
install_nyx | Install the nyx package using apt. | bool | false | no |
install_obfs4proxy | Install the obfs4proxy package using apt. | bool | false | no |
torrc | The torrc configuration file to be installed. | string | n/a | yes |
Name | Description |
---|---|
rendered | The final rendered cloud-init user data. |