ansible-playbooks

another attempt to have everything organized ...
git clone https://git.e1e0.net/ansible-playbooks.git
Log | Files | Refs | README | LICENSE

main.tf (795B)


      1 # Needs HCLOUD_TOKEN env variable set
      2 provider "hcloud" {}
      3 
      4 # ssh key data
      5 data "hcloud_ssh_key" "ssh_key_yubi" {
      6   fingerprint = "d6:67:da:6a:cc:73:24:14:d5:98:af:6d:41:91:92:4c"
      7 }
      8 data "hcloud_ssh_key" "ssh_key_int" {
      9   fingerprint = "1e:ab:c9:e0:9d:b0:2a:93:5c:f6:d2:16:44:5b:2e:ad"
     10 }
     11 
     12 # The server itself
     13 resource "hcloud_server" "jitsi" {
     14   name = "vchat.e1e0.net"
     15   image = "debian-10"
     16   server_type = "cx11"
     17   location = "fsn1"
     18   ssh_keys = ["${data.hcloud_ssh_key.ssh_key_yubi.id}", "${data.hcloud_ssh_key.ssh_key_int.id}"]
     19 }
     20 
     21 # reverse dns
     22 resource "hcloud_rdns" "jitsi" {
     23   server_id = hcloud_server.jitsi.id
     24   ip_address = hcloud_server.jitsi.ipv4_address
     25   dns_ptr = "vchat.e1e0.net"
     26 }
     27 
     28 # Output server IP
     29 output "server_ip_jitsi" {
     30   value = "${hcloud_server.jitsi.ipv4_address}"
     31 }