forked from NixOS/nixops
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroute53.nix
84 lines (68 loc) · 2.43 KB
/
route53.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Configuration specific to the Amazon Route 53 service.
{ config, lib, ... }:
with lib;
{
###### interface
options = {
deployment.route53.accessKeyId = mkOption {
default = "";
example = "AKIABOGUSACCESSKEY";
type = types.str;
description = ''
The AWS Access Key ID. If left empty, it defaults to the
contents of the environment variables
<envar>EC2_ACCESS_KEY</envar> or
<envar>AWS_ACCESS_KEY_ID</envar> (in that order). The
corresponding Secret Access Key is not specified in the
deployment model, but looked up in the file
<filename>~/.ec2-keys</filename>, which should specify, on
each line, an Access Key ID followed by the corresponding
Secret Access Key. If the lookup was unsuccessful it is continued
in the standard AWS tools <filename>~/.aws/credentials</filename> file.
If it does not appear in these files, the
environment variables
<envar>EC2_SECRET_KEY</envar> or
<envar>AWS_SECRET_ACCESS_KEY</envar> are used.
'';
};
# FIXME: hostName is a misnomer; rename to dnsName or something like that.
deployment.route53.hostName = mkOption {
default = "";
example = "test.x.logicblox.com";
type = types.str;
description = ''
The DNS hostname to bind the public IP address to.
'';
};
deployment.route53.ttl = mkOption {
default = 300;
example = 300;
type = types.int;
description = ''
The time to live (TTL) for the A record created for the
specified DNS hostname.
'';
};
deployment.route53.usePublicDNSName = mkOption {
default = false;
type = types.bool;
description = ''
Whether to create a CNAME record with the instance's public DNS name.
This will resolve inside AWS to a private IP and outside AWS to
the public IP.
'';
};
deployment.route53.private = mkOption {
default = false;
type = types.bool;
description = ''
Whether to create an A record with the instance's private address.
Make sure to use this on a Private Hosted DNS zones only, because it will
appear as if the host is down at best, but may cause erroneous requests to
be routed to hosts on your clients' local networks.
'';
};
};
###### implementation
config = mkIf (config.deployment.targetEnv == "ec2") {};
}