Skip to content

Commit 5a3ec09

Browse files
[DBOPS-1073]: Terraform: update instance for supporting overriding properties in changelogs (#654)
1 parent ca94590 commit 5a3ec09

File tree

5 files changed

+43
-10
lines changed

5 files changed

+43
-10
lines changed

harness/dbops/api/swagger.yaml

Lines changed: 37 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -284,11 +284,11 @@ paths:
284284
explode: true
285285
schema:
286286
type: string
287+
default: created
287288
enum:
288289
- name
289290
- updated
290291
- created
291-
default: created
292292
- name: order
293293
in: query
294294
description: Order on the basis of which sorting is done.
@@ -297,10 +297,10 @@ paths:
297297
explode: true
298298
schema:
299299
type: string
300+
default: DESC
300301
enum:
301302
- ASC
302303
- DESC
303-
default: DESC
304304
responses:
305305
"200":
306306
description: Response body for List Database Schema
@@ -926,11 +926,11 @@ paths:
926926
explode: true
927927
schema:
928928
type: string
929+
default: created
929930
enum:
930931
- name
931932
- updated
932933
- created
933-
default: created
934934
- name: order
935935
in: query
936936
description: Order on the basis of which sorting is done.
@@ -939,10 +939,10 @@ paths:
939939
explode: true
940940
schema:
941941
type: string
942+
default: DESC
942943
enum:
943944
- ASC
944945
- DESC
945-
default: DESC
946946
requestBody:
947947
$ref: "#/components/requestBodies/DBInstanceFilterRequest"
948948
responses:
@@ -1675,7 +1675,7 @@ components:
16751675
location: folder/changelog.yaml
16761676
archivePath: archivePath
16771677
schemaSourceType: Git
1678-
type: ""
1678+
type: Repository
16791679
updated: 6
16801680
tags:
16811681
key: tags
@@ -1740,6 +1740,15 @@ components:
17401740
context:
17411741
type: string
17421742
description: Liquibase context
1743+
liquibaseSubstituteProperties:
1744+
type: object
1745+
additionalProperties:
1746+
type: string
1747+
x-stoplight:
1748+
id: lq57gp08jqckf
1749+
description: properties to substitute in liquibase changelog
1750+
x-stoplight:
1751+
id: ylfffbh8lhcwr
17431752
description: Database Instance Request
17441753
x-stoplight:
17451754
id: 1li73zi9bs5oi
@@ -1794,6 +1803,15 @@ components:
17941803
description: Tag on last deployed changeSet
17951804
x-stoplight:
17961805
id: dlbvh5adtk2de
1806+
liquibaseSubstituteProperties:
1807+
type: object
1808+
additionalProperties:
1809+
type: string
1810+
x-stoplight:
1811+
id: szxsmt48sj6o2
1812+
description: properties to substitute in liquibase changelog
1813+
x-stoplight:
1814+
id: zk5v0mxn7p4ns
17971815
description: Database Instance Response
17981816
example:
17991817
identifier: identifier
@@ -2109,10 +2127,10 @@ components:
21092127
filterType:
21102128
type: string
21112129
description: "filter criteria type. Example: Equals, NotEquals"
2130+
default: Equals
21122131
enum:
21132132
- Equals
21142133
- NotEquals
2115-
default: Equals
21162134
x-stoplight:
21172135
id: wh3jb1x9a4mvl
21182136
instanceTags:
@@ -2166,22 +2184,22 @@ components:
21662184
title: SortInstance
21672185
type: string
21682186
description: sort for instance entity
2187+
default: identifier
21692188
enum:
21702189
- name
21712190
- updated
21722191
- created
21732192
- identifier
2174-
default: identifier
21752193
x-stoplight:
21762194
id: zhl6a0ksg19p2
21772195
OrderInstance:
21782196
title: OrderInstance
21792197
type: string
21802198
description: order of instance entity
2199+
default: ASC
21812200
enum:
21822201
- DESC
21832202
- ASC
2184-
default: ASC
21852203
x-stoplight:
21862204
id: l0hdqldkwdms9
21872205
InstanceDetail:
@@ -2642,11 +2660,11 @@ components:
26422660
explode: true
26432661
schema:
26442662
type: string
2663+
default: created
26452664
enum:
26462665
- name
26472666
- updated
26482667
- created
2649-
default: created
26502668
Order:
26512669
name: order
26522670
in: query
@@ -2656,10 +2674,10 @@ components:
26562674
explode: true
26572675
schema:
26582676
type: string
2677+
default: DESC
26592678
enum:
26602679
- ASC
26612680
- DESC
2662-
default: DESC
26632681
PageIndex:
26642682
name: page
26652683
in: query
@@ -2869,6 +2887,15 @@ components:
28692887
version:
28702888
type: string
28712889
description: version of the changelog applied to the database
2890+
liquibaseSubstituteProperties:
2891+
type: object
2892+
additionalProperties:
2893+
type: string
2894+
x-stoplight:
2895+
id: j2at4cjqe9em3
2896+
description: properties to substitute in liquibase changelog
2897+
x-stoplight:
2898+
id: 411rxl6wqmjnm
28722899
examples:
28732900
example-1:
28742901
value:

harness/dbops/docs/DbInstanceIn.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
99
**Branch** | **string** | branch where the instance is stored | [optional] [default to null]
1010
**Connector** | **string** | DB Connector | [default to null]
1111
**Context** | **string** | Liquibase context | [optional] [default to null]
12+
**LiquibaseSubstituteProperties** | **map[string]string** | properties to substitute in liquibase changelog | [optional] [default to null]
1213

1314
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1415

harness/dbops/docs/DbInstanceOut.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Name | Type | Description | Notes
1414
**LastAppliedTag** | **string** | Most recent tag applied to the database | [optional] [default to null]
1515
**ToOnboard** | **bool** | | [optional] [default to null]
1616
**LastDeployedChangeSetTag** | **string** | Tag on last deployed changeSet | [default to null]
17+
**LiquibaseSubstituteProperties** | **map[string]string** | properties to substitute in liquibase changelog | [optional] [default to null]
1718

1819
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1920

harness/dbops/model_db_instance_in.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,6 @@ type DbInstanceIn struct {
2323
Connector string `json:"connector"`
2424
// Liquibase context
2525
Context string `json:"context,omitempty"`
26+
// properties to substitute in liquibase changelog
27+
LiquibaseSubstituteProperties map[string]string `json:"liquibaseSubstituteProperties,omitempty"`
2628
}

harness/dbops/model_db_instance_out.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,6 @@ type DbInstanceOut struct {
3232
ToOnboard bool `json:"toOnboard,omitempty"`
3333
// Tag on last deployed changeSet
3434
LastDeployedChangeSetTag string `json:"lastDeployedChangeSetTag"`
35+
// properties to substitute in liquibase changelog
36+
LiquibaseSubstituteProperties map[string]string `json:"liquibaseSubstituteProperties,omitempty"`
3537
}

0 commit comments

Comments
 (0)