This repository has been archived by the owner on Jul 9, 2021. It is now read-only.
forked from cloudfoundry/csb-brokerpak-aws
-
Notifications
You must be signed in to change notification settings - Fork 1
/
aws-postgresql.yml
439 lines (439 loc) · 14 KB
/
aws-postgresql.yml
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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
# Copyright 2018 the Service Broker Project Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http:#www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
version: 1
name: csb-aws-postgresql
id: fa6334bc-5314-4b63-8a74-c0e4b638c950
description: Amazon RDS for PostgreSQL
display_name: Amazon RDS for PostgreSQL
image_url: https://d1.awsstatic.com/rdsImages/postgresql_logo.6de4615badd99412268bc6aa8fc958a0f403dd41.png
documentation_url: https://aws.amazon.com/rds/postgresql/
support_url: https://aws.amazon.com/rds/postgresql/
tags: [aws, postgresql, postgres, preview]
plan_updateable: true
plans:
- name: small
id: ffc51616-228b-41bd-bed1-d601c18d58f5
description: 'PostgreSQL 11, minumum 2 cores, minumum 4GB ram, 5GB storage'
display_name: "small"
properties:
cores: 2
postgres_version: 11
storage_gb: 5
subsume: false
- name: medium
id: e64d07f9-ceb2-40a6-abd9-391047fa3cf5
description: 'PostgreSQL 11, minumum 4 cores, minumum 8GB ram, 10GB storage'
display_name: "medium"
properties:
cores: 4
postgres_version: 11
storage_gb: 10
subsume: false
- name: large
id: 48baef10-a14c-4ae1-aab5-25f26eba941a
description: 'PostgreSQL 11, minumum 8 cores, minumum 16GB ram, 20GB storage'
display_name: "large"
properties:
cores: 8
postgres_version: 11
storage_gb: 20
subsume: false
- name: subsume
id: 886cb524-1d4f-11eb-b35f-8ba96a9085d7
description: 'Subsume control of an existing Postgre Database'
display_name: "Subsume"
properties:
subsume: true
provision:
import_inputs:
- field_name: aws_db_id
type: string
details: AWS db id to subsume
tf_resource: aws_db_instance.db_instance
import_parameter_mappings:
- tf_variable: allocated_storage
parameter_name: var.storage_gb
import_parameters_to_delete: ["aws_db_instance.db_instance.id",
"aws_db_instance.db_instance.hosted_zone_id", "aws_db_instance.db_instance.address",
"aws_db_instance.db_instance.replicas","aws_db_instance.db_instance.endpoint",
"aws_db_instance.db_instance.arn",
"aws_db_instance.db_instance.resource_id",
"aws_db_instance.db_instance.status"]
plan_inputs:
- field_name: cores
required: true
type: integer
details: Minimum number of cores for service instance.
default: 2
constraints:
maximum: 64
minimum: 1
multipleOf: 2
- field_name: postgres_version
required: true
type: string
details: The version for the PostgreSQL instance.
default: 11
enum:
9.4: PostgreSQL 9.4
9.5: PostgreSQL 9.5
9.6: PostgreSQL 9.6
10: PostgreSQL 10
11: PostgreSQL 11
- field_name: storage_gb
required: true
type: number
details: Size of storage volume for service instance.
default: 5
constraints:
maximum: 4096
minumum: 5
- field_name: subsume
type: boolean
details: Indicates an existing PostgreSQL instnace should be subsumed
user_inputs:
- field_name: use_tls
type: boolean
details: Use TLS for connection
default: true
- field_name: storage_autoscale
type: boolean
default: false
details: Enable storage autoscaling up to storage_autoscale_limit_gb if true
- field_name: storage_autoscale_limit_gb
type: number
details: Max storage size if storage_autoscale is true
default: 0
- field_name: storage_encrypted
type: boolean
default: false
details: Enable encrypted storage
- field_name: parameter_group_name
type: string
default: ""
details: DB parameter group name - default 'default.postgres.<postgresql version>'
- field_name: instance_name
type: string
details: Name for your PostgreSQL instance
default: csb-postgresql-${request.instance_id}
constraints:
maxLength: 98
minLength: 6
pattern: ^[a-z][a-z0-9-]+$
prohibit_update: true
- field_name: db_name
type: string
details: Name for your database
default: vsbdb
constraints:
maxLength: 64
- field_name: publicly_accessible
type: boolean
details: Make instance public if true
default: false
- field_name: region
type: string
details: The region of the PostgreSQL instance.
default: us-west-2
enum:
us-east-2 : us-east-2
us-east-1 : us-east-1
us-west-1 : us-west-1
us-west-2 : us-west-2
ap-east-1 : ap-east-1
ap-south-1 : ap-south-1
ap-northeast-3 : ap-northeast-3
ap-northeast-2 : ap-northeast-2
ap-southeast-1 : ap-southeast-1
ap-southeast-2 : ap-southeast-2
ap-northeast-1 : ap-northeast-1
ca-central-1 : ca-central-1
cn-north-1 : cn-north-1
cn-northwest-1 : cn-northwest-1
eu-central-1 : eu-central-1
eu-west-1 : eu-west-1
eu-west-2 : eu-west-2
eu-west-3 : eu-west-3
eu-north-1 : eu-north-1
me-south-1 : me-south-1
sa-east-1 : sa-east-1
- field_name: multi_az
type: boolean
details: Make instance multi AZ if true (see https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.MultiAZ.html)
default: false
- field_name: aws_access_key_id
type: string
details: AWS access key
default: ${config("aws.access_key_id")}
- field_name: aws_secret_access_key
type: string
details: AWS secret key
default: ${config("aws.secret_access_key")}
- field_name: aws_vpc_id
details: VPC ID for instance
default: ""
- field_name: instance_class
type: string
details: AWS DB instance class (see https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html) Will be computed from cache_size if empty.
default: ""
- field_name: rds_subnet_group
type: string
details: AWS RDS subnet group already in existence to use
default: ""
- field_name: rds_vpc_security_group_ids
type: string
details: Comma delimited list of security group ID's for instance
default: ""
- field_name: allow_major_version_upgrade
type: boolean
details: Allow major version upgrades. Changing this parameter does not result in an outage and the change is asynchronously applied as soon as possible.
default: true
- field_name: auto_minor_version_upgrade
type: boolean
details: Allow minor version upgrades automatically during the maintenance window
default: true
- field_name: maintenance_day
type: string
details: The preferred maintenance day
default: Sun
enum:
Sun: Sunday
Mon: Monday
Tue: Tuesday
Wed: Wednesday
Thu: Thursday
Fri: Friday
Sat: Saturday
- field_name: maintenance_start_hour
type: string
details: The preferred maintenance start hour
default: "00"
enum:
"00": 12 am
"01": 1 am
"02": 2 am
"03": 3 am
"04": 4 am
"05": 5 am
"06": 6 am
"07": 7 am
"08": 8 am
"09": 9 am
"10": 10 am
"11": 11 am
"12": 12 pm
"13": 1 pm
"14": 2 pm
"15": 3 pm
"16": 4 pm
"17": 5 pm
"18": 6 pm
"19": 7 pm
"20": 8 pm
"21": 9 pm
"22": 10 pm
"23": 11 pm
- field_name: maintenance_start_min
type: string
details: The preferred maintenance start minute
default: "00"
enum:
"00": Top of the hour
"15": 15 minutes
"30": 30 minutes
"45": 45 minutes
- field_name: maintenance_end_hour
type: string
details: The preferred maintenance end hour
default: "00"
enum:
"00": 12 am
"01": 1 am
"02": 2 am
"03": 3 am
"04": 4 am
"05": 5 am
"06": 6 am
"07": 7 am
"08": 8 am
"09": 9 am
"10": 10 am
"11": 11 am
"12": 12 pm
"13": 1 pm
"14": 2 pm
"15": 3 pm
"16": 4 pm
"17": 5 pm
"18": 6 pm
"19": 7 pm
"20": 8 pm
"21": 9 pm
"22": 10 pm
"23": 11 pm
- field_name: maintenance_end_min
type: string
details: The preferred maintenance end minute
default: "00"
enum:
"00": Top of the hour
"15": 15 minutes
"30": 30 minutes
"45": 45 minutes
computed_inputs:
- name: labels
default: ${json.marshal(request.default_labels)}
overwrite: true
type: object
- name: engine
default: postgres
overwrite: true
type: string
- name: engine_version
default: ${postgres_version}
overwrite: true
type: string
- name: maintenance_window
default: ${maintenance_day}:${maintenance_start_hour}:${maintenance_start_min}-${maintenance_day}:${maintenance_end_hour}:${maintenance_end_min}
overwrite: true
type: string
template_refs:
outputs: ./terraform/rds/provision/outputs.tf
provider: ./terraform/rds/provision/provider.tf
variables: ./terraform/rds/provision/variables.tf
main: ./terraform/rds/provision/main.tf
data: ./terraform/rds/provision/data.tf
outputs:
- field_name: name
type: string
details: The name of the database.
- field_name: hostname
type: string
details: Hostname or IP address of the exposed PostgreSQL endpoint used by clients to connect to the service.
- field_name: port
type: integer
details: The port number of the exposed PostgreSQL instance.
- field_name: username
type: string
details: The username to authenticate to the database instance.
- field_name: password
type: string
details: The password to authenticate to the database instance.
- field_name: use_tls
type: boolean
details: Using TLS for connection
bind:
plan_inputs: []
user_inputs: []
computed_inputs:
- name: db_name
type: string
default: ${instance.details["name"]}
overwrite: true
- name: hostname
type: string
default: ${instance.details["hostname"]}
overwrite: true
- name: port
type: integer
default: ${instance.details["port"]}
overwrite: true
- name: admin_username
type: string
default: ${instance.details["username"]}
overwrite: true
- name: admin_password
type: string
default: ${instance.details["password"]}
overwrite: true
- name: use_tls
type: boolean
default: ${instance.details["use_tls"]}
overwrite: true
template_refs:
outputs: ./terraform/rds/bind/postgresql/outputs.tf
provider: ./terraform/rds/bind/postgresql/provider.tf
variables: ./terraform/rds/bind/postgresql/variables.tf
main: ./terraform/rds/bind/postgresql/main.tf
data: ./terraform/rds/bind/postgresql/data.tf
outputs:
- field_name: username
type: string
details: The username to authenticate to the database instance.
- field_name: password
type: string
details: The password to authenticate to the database instance.
- field_name: uri
type: string
details: The uri to connect to the database instance and database.
- field_name: jdbcUrl
type: string
details: The jdbc url to connect to the database instance and database.
examples:
- name: small
description: Create a small PostgreSQL instance
plan_id: ffc51616-228b-41bd-bed1-d601c18d58f5
provision_params: { "publicly_accessible": true, "use_tls": false }
bind_params: {}
- name: small-v9.6-50gb
description: Create a small PostgreSQL v9.6 instance with 50gb storage
plan_id: ffc51616-228b-41bd-bed1-d601c18d58f5
provision_params: { "postgres_version": "9.6", "storage_gb": 50, "publicly_accessible": true, "use_tls": false}
bind_params: {}
- name: medium
description: Create a medium PostgreSQL instance
plan_id: e64d07f9-ceb2-40a6-abd9-391047fa3cf5
provision_params: { "publicly_accessible": true, "use_tls": false }
bind_params: {}
- name: large
description: Create a large PostgreSQL instance
plan_id: 48baef10-a14c-4ae1-aab5-25f26eba941a
provision_params: { "publicly_accessible": true, "use_tls": false }
bind_params: {}
- name: medium-multiaz
description: Create a medium PostgreSQL instance
plan_id: e64d07f9-ceb2-40a6-abd9-391047fa3cf5
provision_params: { "publicly_accessible": true, "multi_az": true, "use_tls": false }
bind_params: {}
- name: small-v9.4
description: Create a small PostgreSQL v9.4 instance
plan_id: ffc51616-228b-41bd-bed1-d601c18d58f5
provision_params: { "postgres_version": "9.4","publicly_accessible": true, "use_tls": false }
bind_params: {}
- name: small-v9.5
description: Create a small PostgreSQL v9.5 instance
plan_id: ffc51616-228b-41bd-bed1-d601c18d58f5
provision_params: { "postgres_version": "9.5","publicly_accessible": true, "use_tls": false }
bind_params: {}
- name: small-v10
description: Create a small PostgreSQL v10 instance
plan_id: ffc51616-228b-41bd-bed1-d601c18d58f5
provision_params: { "postgres_version": "10","publicly_accessible": true, "use_tls": false }
bind_params: {}
- name: small-encrypted
description: Create a small PostgreSQL instance with encrypted storage
plan_id: ffc51616-228b-41bd-bed1-d601c18d58f5
provision_params: { "storage_encrypted": true, "publicly_accessible": true, "use_tls": false }
bind_params: {}
- name: small-disable-upgrades
description: Create a small PostgreSQL instance with disabled upgrades
plan_id: ffc51616-228b-41bd-bed1-d601c18d58f5
provision_params: { "allow_major_version_upgrade": false, "auto_minor_version_upgrade": false, "publicly_accessible": true, "use_tls": false }
bind_params: {}
- name: small-with-maintenance-window
description: Create a small PostgreSQL instance with encrypted storage
plan_id: ffc51616-228b-41bd-bed1-d601c18d58f5
provision_params: { "maintenance_day": "Thu", "maintenance_start_hour": "15", "maintenance_start_min": "30", "maintenance_end_hour": "17", "maintenance_end_min": "00", "publicly_accessible": true, "use_tls": false }
bind_params: {}