-
Notifications
You must be signed in to change notification settings - Fork 12
/
trove_database.yaml
70 lines (63 loc) · 1.96 KB
/
trove_database.yaml
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
# http://docs.openstack.org/developer/heat/template_guide/hot_spec.html#heat-template-version
heat_template_version: 2021-04-16
# NOTE: You will require Database service quota for this to deploy successfully.
description: >
Nectar database service instance. This will deploy a MySQL database using the
latest datastore version available.
parameters:
name:
type: string
description: Name of the database
default: my_database
constraints:
- length: { min: 1, max: 64 }
description: Database name must be between 1 and 64 chars
size:
type: number
description: Database volume size in DB
default: 1
flavor:
type: string
description: Database instance flavor
default: db.small
constraints:
- custom_constraint: trove.flavor
availability_zone:
type: string
description: Availability zone
username:
type: string
description: Username for the database
default: my_user
password:
type: string
description: Password for the database user (must be > 6 characters long).
hidden: true
constraints:
- length: { min: 6 }
description: Passwords must be at least 6 characters in length.
datastore_type:
type: string
description: Database datastore type
default: mysql
resources:
# http://docs.openstack.org/developer/heat/template_guide/openstack.html#OS::Trove::Instance
my_database:
type: OS::Trove::Instance
properties:
name: { get_param: name }
databases:
- name: { get_param: name }
datastore_type: { get_param: datastore_type }
availability_zone: { get_param: availability_zone }
flavor: { get_param: flavor }
size: { get_param: size }
users:
- name: { get_param: username }
password: { get_param: password }
databases:
- { get_param: name }
outputs:
host_name:
description: The host name of the database
value: { get_attr: [my_database, hostname] }