aboutsummaryrefslogtreecommitdiffstats
path: root/terraform.nix
blob: e3f1b0df7212487f76d953d7a45d4c2bdbc6d37e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
let
  inherit (import <fysiweb>) fysilib lib;
in
fysilib.terraform.eval (import <fysiweb/terraform.nix> {
  terraform = {
    #required_providers = {
    #  hetznerdns = {
    #    source = "timohirt/hetznerdns";
    #  };
    #};
  };
  resource = {
    hcloud_server.system1 = {
      name = "system1";
      server_type = "cx11";
      location = "nbg1";
      image = "\${data.hcloud_image.base.id}";
      ssh_keys = [
        "fysiweb-cli"
      ];
    };
    hcloud_floating_ip.primary_ipv4 = {
      type = "ipv4";
      server_id = "\${hcloud_server.system1.id}";
    };
    hcloud_floating_ip.primary_ipv6 = {
      type = "ipv6";
      server_id = "\${hcloud_server.system1.id}";
    };
    #hetznerdns_zone."nomath_org" = {
    #  name = "nomath.org";
    #  ttl = 60;
    #};
    #hetznerdns_record."all_nomath_org" = {
    #  zone_id = "\${hetznerdns_zone.nomath_org.id}";
    #  name = "@";
    #  value = "\${hcloud_server.system1.ipv4_address}";
    #  type = "A";
    #};
  };
})