-
Notifications
You must be signed in to change notification settings - Fork 10
/
azure-mssql-db.yml
245 lines (244 loc) · 8.97 KB
/
azure-mssql-db.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
# Copyright 2020 Pivotal Software, Inc.
#
# 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-azure-mssql-db
id: 6663f9f1-33c1-4f7d-839c-d4b7682d88cc
description: Manage Azure SQL Databases on pre-provisioned database servers
display_name: Azure SQL Database
image_url: file://service-images/csb.png
documentation_url: https://docs.microsoft.com/en-us/azure/sql-database/
support_url: https://docs.microsoft.com/en-us/azure/sql-database/
tags: [azure, mssql, sqlserver, preview]
plan_updateable: true
plans:
- name: small
id: fd07d12b-94f8-4f69-bd5b-e2c4e84fafc1
description: 'SQL Server latest version. Instance properties: General Purpose - Serverless ; 0.5 - 2 cores ; Max Memory: 6gb ; 5 GB storage ; auto-pause enabled after 1 hour of inactivity'
display_name: "Small"
- name: medium
id: 3ee14bce-33e8-4d02-9850-023a66bfe120
description: 'SQL Server latest version. Instance properties: General Purpose - Provisioned ; Provisioned Capacity ; 8 cores ; 200 GB storage'
display_name: "Medium"
properties:
cores: 8
max_storage_gb: 200
- name: large
id: 8f1c9c7b-80b2-49c3-9365-a3a059df9907
description: 'SQL Server latest version. Instance properties: Business Critical ; Provisioned Capacity ; 32 cores ; 500 GB storage'
display_name: "Large"
properties:
cores: 32
max_storage_gb: 500
- name: extra-large
id: 09096759-58a8-41d0-96bf-39b02a0e4104
description: 'SQL Server latest version. Instance properties: Business Critical ; Provisioned Capacity ; 80 cores ; 1 TB storage'
display_name: "Extra Large"
properties:
cores: 80
max_storage_gb: 1024
provision:
plan_inputs: []
user_inputs:
- field_name: cores
type: number
default: 2
details: Number vcores for the instance (upto the maximum allowed for the service tier)
constraints:
maximum: 80
minimum: 1
multipleOf: 2
- field_name: max_storage_gb
type: number
default: 5
details: Maximum storage allocated to the database instance in GB
constraints:
minimum: 1
- field_name: db_name
type: string
details: Name for your database
default: csb-db-${request.instance_id}
constraints:
maxLength: 64
- field_name: server
type: string
details: Name of server from server_credentials to create database upon
required: true
- field_name: azure_tenant_id
type: string
details: Azure Tenant to create resource in
default: ${config("azure.tenant_id")}
- field_name: azure_subscription_id
type: string
details: Azure Subscription to create resource in
default: ${config("azure.subscription_id")}
- field_name: azure_client_id
type: string
details: Client ID of Azure principal
default: ${config("azure.client_id")}
- field_name: azure_client_secret
type: string
details: Client secret for Azure principal
default: ${config("azure.client_secret")}
- field_name: skip_provider_registration
type: boolean
details: Skip automatic Azure provider registration, set to true if service principal being used does not have rights to register providers
default: false
- field_name: sku_name
type: string
details: Azure sku (typically, tier [GP_S,GP,BC,HS] + family [Gen4,Gen5] + cores, e.g. GP_S_Gen4_1, GP_Gen5_8) Will be computed from cores if empty.
default: ""
- field_name: short_term_retention_days
type: number
details: Retention period in days for short term retention (Point in Time Restore) policy
default: 7
constraints:
maximum: 35
- field_name: ltr_weekly_retention
type: string
details: The weekly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 520 weeks.
default: "PT0S"
constraints:
pattern: "^(P|PT)(?:[0-9]|[1-9][0-9]|[1-4][0-9]{2}|5[0-1][0-9]|520)(W|S)$"
required: false
- field_name: ltr_monthly_retention
type: string
details: The monthly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 120 months.
default: "PT0S"
constraints:
pattern: "^(P|PT)([0-9]{1,2}|1[01][0-9]|12[0])(M|S)$"
required: false
- field_name: ltr_yearly_retention
type: string
details: The yearly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 10 years.
default: "PT0S"
constraints:
pattern: "^(P|PT)10|[0-9](Y|S)$"
required: false
- field_name: ltr_week_of_year
type: number
details: The week of year to take the yearly backup. Value has to be between 1 and 52.
default: 1
constraints:
minimum: 1
maximum: 52
required: false
template_refs:
outputs: terraform/azure-mssql-db/provision/mssql-db-outputs.tf
provider: terraform/azure-mssql-db/provision/mssql-db-providers.tf
versions: terraform/azure-mssql-db/provision/mssql-db-versions.tf
variables: terraform/azure-mssql-db/provision/mssql-db-variables.tf
main: terraform/azure-mssql-db/provision/mssql-db-main.tf
data: terraform/azure-mssql-db/provision/mssql-db-data.tf
computed_inputs:
- name: labels
default: ${json.marshal(request.default_labels)}
overwrite: true
type: object
- name: server_credentials
type: object
details: 'JSON hash of server credentials. { "name1":{"server_name":"...", "server_resource_group":"...", "admin_username":"...", "admin_password":"..."},"name2":{...}...}'
overwrite: true
default: ${config("azure.mssql_db_server_creds")}
outputs:
- field_name: sqlServerName
type: string
details: Hostname of the Azure SQL Server
- field_name: sqldbName
type: string
details: The name of the database.
- field_name: sqlServerFullyQualifiedDomainName
type: string
details: The fully qualifief domain name (FQDN) of the Azure SQL Server
- field_name: hostname
type: string
details: Hostname of the Azure SQL Server
- field_name: port
type: integer
details: The port number to connect to the database on
- field_name: name
type: string
details: The name of the database.
- field_name: username
type: string
details: The username to authenticate to the database server.
- field_name: password
type: string
details: The password to authenticate to the database server.
- field_name: server
type: string
details: Server from credentials
bind:
plan_inputs: []
user_inputs: []
computed_inputs:
- name: mssql_db_name
type: string
default: ${instance.details["name"]}
overwrite: true
- name: mssql_hostname
type: string
default: ${instance.details["hostname"]}
overwrite: true
- name: mssql_port
type: integer
default: ${instance.details["port"]}
overwrite: true
- name: server
type: string
details: Name of server from server_credentials to create database upon
overwrite: true
default: ${instance.details["server"]}
- name: server_credentials
type: object
details: 'JSON hash of server credentials. { "name1":{"server_name":"...", "server_resource_group":"...", "admin_username":"...", "admin_password":"..."},"name2":{...}...}'
overwrite: true
default: ${config("azure.mssql_db_server_creds")}
- name: admin_username
type: string
default: ${instance.details["username"]}
overwrite: true
- name: admin_password
type: string
default: ${instance.details["password"]}
overwrite: true
template_refs:
versions: terraform/azure-mssql-db/bind/mssql-bind-versions.tf
providers: terraform/azure-mssql-db/bind/mssql-bind-providers.tf
outputs: terraform/azure-mssql-db/bind/mssql-bind-outputs.tf
variables: terraform/azure-mssql-db/bind/mssql-bind-variables.tf
main: terraform/azure-mssql-db/bind/mssql-bind-main.tf
data: terraform/azure-mssql-db/bind/mssql-bind-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.
- field_name: jdbcUrlForAuditingEnabled
type: string
details: The audit enabled JDBC URL to connect to the database server and database.
- field_name: databaseLogin
type: string
details: The username to authenticate to the database server.
- field_name: databaseLoginPassword
type: string
details: The password to authenticate to the database server.