-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathddb-template.yaml
169 lines (168 loc) · 4.83 KB
/
ddb-template.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
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
apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
metadata:
name: create-documentdb
title: Create DocumentDB instance
description: Will create a new DocumentDB instance
tags:
- aws
- database
- infrastructure
spec:
owner: Ops
type: infrastructure
parameters:
- title: "Provide information"
required:
- owner
- instance_name
- docdb_version
- instance_class
- instance_number
- product_line
properties:
owner:
title: "Owner"
type: string
description: Owner of the component
ui:field: OwnerPicker
ui:options:
allowedKinds:
- Group
instance_name:
title: "instance_name"
type: string
description: Unique name of your DocumentDB cluster
docdb_version:
title: "Version of DocumentDB"
type: string
description: DocumentDB cluster version
anyOf:
- type: string
title: 3.6.0
enum:
- "3.6.0"
- type: string
title: 4.0.0
enum:
- "4.0.0"
instance_class:
title: "Instance class"
type: string
description: Choose an DocumentDB instance class
anyOf:
- type: string
title: db.t4.medium(2cpu, 4Gib RAM)
enum:
- "db.t4.medium"
- type: string
title: db.r6g.large(2cpu, 16Gib RAM)
enum:
- "db.r6g.large"
- type: string
title: db.r6g.xlarge(4cpu, 32Gib RAM)
enum:
- "db.r6g.xlarge"
- type: string
title: db.r6g.2xlarge(4cpu, 64Gib RAM)
enum:
- "db.r6g.2xlarge"
instance_number:
title: "Number of instances"
type: string
description: Choose an DocumentDB instance number
anyOf:
- type: string
title: "1"
enum:
- "1"
- type: string
title: "2"
enum:
- "2"
- type: string
title: "3"
enum:
- "3"
- type: string
title: "4"
enum:
- "4"
product_line:
title: "Product line"
type: string
description: Choose your product line
anyOf:
- type: string
title: ugc
enum:
- "ugc"
- type: string
title: communication
enum:
- "communication"
- type: string
title: platform
enum:
- "platform"
- type: string
title: data-group
enum:
- "data-group"
- type: string
title: loyalty
enum:
- "loyalty"
- type: string
title: infra
enum:
- "infra"
- type: string
title: subscriptions
enum:
- "subscriptions"
- type: string
title: smsbump
enum:
- "smsbump"
- type: string
title: app-infra
enum:
- "app-infra"
steps:
- id: template
name: Fetch Skeleton + Template
action: fetch:template
input:
url: ./skeleton
targetPath: temp
copyWithoutRender:
- .github/workflows/*
values:
instance_name: '${{ parameters.instance_name }}'
instance_class: '${{ parameters.instance_class }}'
instance_number: '${{ parameters.instance_number }}'
docdb_version: '${{ parameters.docdb_version }}'
product_line: '${{ parameters.product_line }}'
- id: "file rename"
name: Renamne the configuration
action: fs:rename
input:
files:
- from: temp/documentDB-template.tf
to: ${{ parameters.instance_name}}.tf
- id: publish
name: Create a pull request
action: publish:github:pull-request
input:
repoUrl: 'github.com?owner=sblausten&repo=terraform-ddb-test'
targetPath: 'terraform/rds'
title: "feat(backstage): 'add backstage docdb entities for ${{ parameters.instance_name }}'"
branchName: add-docdb-backstage-entities-for-${{ parameters.instance_name }}
description: |
# Add docdb ackstage entities for: ${{parameters.instance_name}}
${{ parameters.instance_name if parameters.instance_name else "" }}
output:
links:
- url: ${{steps.publish.output.remoteUrl}}
text: "Pull request"