-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmassdriver.yaml
More file actions
201 lines (201 loc) · 5.77 KB
/
massdriver.yaml
File metadata and controls
201 lines (201 loc) · 5.77 KB
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
schema: draft-07
name: gcp-cloud-sql-postgres
version: 1.1.0
description: Fully managed PostgreSQL relational database service offering high availability, encryption, backups and zero-downtime capacity increases.
source_url: https://github.com/massdriver-cloud/gcp-cloud-sql-postgres
params:
examples:
- __name: Production
engine_version: 14.x
instance_configuration:
tier: CUSTOM
cores: 10
memory: 19968
disk_size: 1000
database_configuration:
retained_backup_count: 7
query_insights_enabled: true
deletion_protection: true
- __name: Staging
engine_version: 14.x
instance_configuration:
tier: CUSTOM
cores: 1
memory: 3840
disk_size: 200
database_configuration:
retained_backup_count: 7
query_insights_enabled: true
deletion_protection: true
- __name: Development
engine_version: 14.x
instance_configuration:
tier: db-f1-micro
disk_size: 20
database_configuration:
retained_backup_count: 1
deletion_protection: false
required:
- engine_version
- username
- instance_configuration
properties:
engine_version:
type: string
title: PostgreSQL Major Version
description: The major version of PostgreSQL to use for your database. GCP manages minor version upgrades.
default: 14.x
enum:
- 14.x
- 13.x
- 12.x
- 11.x
- 10.x
- 9.6.x
username:
title: Username
description: Primary DB username.
type: string
default: root
minLength: 1
maxLength: 63
instance_configuration:
type: object
title: Instance Configuration
description: Instance type, disk size, configure properties for your primary instance.
required:
- disk_size
- disk_type
- tier
properties:
disk_size:
type: integer
title: Disk Size
description: The size of the primary database instance in GB.
minimum: 20
maximum: 3054
disk_type:
type: string
title: Disk Type
description: Solid State has better performance for mixtures of reads and writes. Use Hard Disks for continuous read workloads or for cheaper storage.
default: Solid State
enum:
- Solid State
- Hard Disk
tier:
type: string
title: Instance Type
description: The type of compute used for the database instance.
oneOf:
- title: F1 Micro
const: db-f1-micro
- title: G1 Small
const: db-g1-small
- title: Custom
const: CUSTOM
dependencies:
tier:
oneOf:
- properties:
tier:
const: CUSTOM
cores:
type: integer
title: Cores
description: The number of cores to use for the database instance. A multiple of 2, at most 96.
minimum: 2
maximum: 96
multipleOf: 2
memory:
type: integer
title: Memory
description: The amount of memory to use for the database instance. A multiple of 256 MB, at least 3840 MB. Per-core memory is allowed to range from 900 MB to 6.5 GB.
minimum: 3840
maximum: 624000
multipleOf: 256
required:
- cores
- memory
- properties:
tier:
enum:
- db-f1-micro
- db-g1-small
database_configuration:
type: object
title: Database Configuration
description: High availability, backups, other database settings can be configured here.
required:
- retained_backup_count
properties:
high_availability_enabled:
type: boolean
title: Enable High Availability
description: If set to true, GCP will manage a hot standby primary node for you. It will automatically fail over to the hot stanby in the event of a zonal or node failure drastically minimizing downtime.
default: true
retained_backup_count:
type: integer
title: Max Backups To Keep
description: The number of backups to keep. If another backup is made, the oldest one is deleted.
minimum: 0
maximum: 20
query_insights_enabled:
type: boolean
title: Query Insights Enabled
description: Enables query insights for your instance
default: false
transaction_log_retention_days:
type: integer
title: Transaction Log Retention Days
description: The number of days to keep the transaction logs before deleting them.
default: 5
minimum: 1
maximum: 7
deletion_protection:
title: Deletion Protection
description: If the DB instance should have deletion protection enabled.
type: boolean
default: true
connections:
required:
- gcp_authentication
- subnetwork
properties:
gcp_authentication:
"$ref": massdriver/gcp-service-account
subnetwork:
"$ref": massdriver/gcp-subnetwork
artifacts:
required:
- authentication
properties:
authentication:
"$ref": massdriver/postgresql-authentication
ui:
ui:order:
- engine_version
- username
- instance_configuration
- database_configuration
- transaction_log_retention_days
- deletion_protection
- "*"
instance_configuration:
ui:order:
- disk_size
- disk_type
- tier
- cores
- memory
- "*"
database_configuration:
ui:order:
- high_availability_enabled
- retained_backup_count
- query_insights_enabled
steps:
- path: src
provisioner: opentofu
config:
checkov:
enable: true