forked from NixOS/nixops
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathec2-rds-dbinstance.nix
79 lines (62 loc) · 1.89 KB
/
ec2-rds-dbinstance.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
{ config, lib, uuid, name, ... }:
with lib;
{
options = {
id = mkOption {
type = types.str;
default = "nixops-${uuid}-${name}";
description = "Identifier for RDS database instance";
};
region = mkOption {
type = types.str;
description = "Amazon RDS region.";
};
accessKeyId = mkOption {
default = "";
type = types.str;
description = "The AWS Access Key ID.";
};
allocatedStorage = mkOption {
type = types.int;
description = "Allocated storage in GB";
};
instanceClass = mkOption {
type = types.str;
example = "db.m3.xlarge";
description = ''
RDS instance class. See <link
xlink:href='http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html' />
for more information.
'';
};
masterUsername = mkOption {
type = types.str;
example = "sa";
description = "Master username for authentication to database instance.";
};
masterPassword = mkOption {
type = types.str;
description = "Password for master user.";
};
port = mkOption {
type = types.int;
description = "Port for database instance connections.";
};
engine = mkOption {
type = types.str;
description = ''Database engine. See <link
xlink:href='http://boto.readthedocs.org/en/latest/ref/rds.html#boto.rds.RDSConnection.create_dbinstance'
for valid engines.'';
};
dbName = mkOption {
type = types.str;
description = "Optional database name to be created when instance is first created.";
};
endpoint = mkOption {
default = ""; # FIXME: Needs a default until read-only options are supported.
type = types.str;
description = "The endpoint address of the database instance. This is set by NixOps.";
};
};
config._type = "ec2-rds-dbinstance";
}