-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtejat-prior.nix
56 lines (51 loc) · 1.9 KB
/
tejat-prior.nix
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{ pkgs, lib, ... }:
let
inherit (import ./common.nix pkgs) mkAWS;
inherit (pkgs.lib) mkAddressRecords;
in {
resource.aws_instance.tejat-prior = mkAWS {
key_name = "Chris"; # eu-west-2
volume_size = "40";
tags = {
Name = "tejat-prior";
};
vpc_security_group_ids = [
"\${aws_security_group.egress_all.id}"
"\${aws_security_group.http.id}"
"\${aws_security_group.ssh.id}"
"\${aws_security_group.wireguard.id}"
"\${aws_security_group.mumble.id}"
];
};
# Public DNS
resource.aws_eip.tejat-prior = {
instance = "\${aws_instance.tejat-prior.id}";
vpc = true;
};
resource.aws_route53_record = lib.mapAttrs (_: lib.recursiveUpdate { ttl = "60"; }) {
mumble_cname = {
zone_id = "\${data.aws_route53_zone.serokell_team.zone_id}";
name = "mumble.\${data.aws_route53_zone.serokell_team.name}";
type = "CNAME";
records = ["\${aws_route53_record.tejat-prior_gemini_serokell_team_ipv4.name}"];
};
ligo_webide_cname = {
zone_id = "\${data.aws_route53_zone.serokell_team.zone_id}";
name = "ligo-webide.\${data.aws_route53_zone.serokell_team.name}";
type = "CNAME";
records = ["\${aws_route53_record.tejat-prior_gemini_serokell_team_ipv4.name}"];
};
ligo_webide_cors_proxy_cname = {
zone_id = "\${data.aws_route53_zone.serokell_team.zone_id}";
name = "ligo-webide-cors-proxy.\${data.aws_route53_zone.serokell_team.name}";
type = "CNAME";
records = ["\${aws_route53_record.tejat-prior_gemini_serokell_team_ipv4.name}"];
};
} // mkAddressRecords [{
resource = "tejat-prior_gemini_serokell_team";
zone_id = "\${aws_route53_zone.gemini_serokell_team.zone_id}";
name = "tejat-prior.\${aws_route53_zone.gemini_serokell_team.name}";
ipv4_records = ["\${aws_eip.tejat-prior.public_ip}"];
ipv6_records = ["\${aws_instance.tejat-prior.ipv6_addresses[0]}"];
}];
}