-
Notifications
You must be signed in to change notification settings - Fork 10
/
schema.yaml
477 lines (402 loc) · 13.1 KB
/
schema.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
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
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
# Title shown in Application Information tab.
title: Sample Marketplace Stack / ORM Application - BYOL
# Sub Title shown in Application Information tab.
description: This is a Sample Marketplace Stack / ORM Application - BYOL
schemaVersion: 1.1.0
version: "20190304"
# URL of Logo Icon used on Application Information tab. You can copy the contentId from the Marketplace listing logo URL in the Marketplace Partner portal.
# (Optional)
logoUrl: https://cloudmarketplace.oracle.com/marketplace/content?contentId=71617800
# Used in Application Information tab to Hyperlink Title and Logo to the Marketplace
# Listing.
# Also used to link to Listing Usage section for "View Instructions".
# (Optional) If it is missing, Application Information uses the
# "marketplace-listing-id" tag for the same purpose.
source:
type: marketplace
reference: 12345
locale: "en"
variableGroups:
- title: "Hidden Variable Group"
visible: false
variables:
#"variables used internally - not exposed to end user"
- tenancy_ocid
- region
- mp_listing_id
- mp_listing_resource_id
- mp_listing_resource_version
- availability_domain_number
- mp_subscription_enabled
- network_strategy_enum
- subnet_type_enum
- nsg_config_enum
#change compute.tf and move custom_image_id to Compute group in case you want to use a custom_image
- custom_image_id
- marketplace_source_images
- title: "Compute Configuration"
variables:
- compute_compartment_ocid
- vm_display_name
- hostname_label
- vm_compute_shape
- vm_flex_shape_ocpus
- availability_domain_name
- ssh_public_key
- title: "Virtual Cloud Network"
variables:
- network_compartment_ocid
- network_strategy
- network_configuration_strategy
- vcn_id
- vcn_display_name
- vcn_dns_label
- vcn_cidr_block
- title: "Simple Subnet"
visible: #($network_strategy == ""Use Existing VCN and Subnet"") OR (network_configuration_strategy == "Customize Network Configuration")
or:
- eq:
- network_strategy
- "Use Existing VCN and Subnet"
- eq:
- network_configuration_strategy
- "Customize Network Configuration"
variables:
- subnet_type
- subnet_id
- subnet_display_name
- subnet_dns_label
- subnet_cidr_block
- nsg_configuration_strategy
- title: "Network Security Group"
visible: #($nsg_configuration_strategy == "Customize Network Security Group")
eq:
- nsg_configuration_strategy
- "Customize Network Security Group"
variables:
- nsg_display_name
- nsg_source_cidr
- nsg_ssh_port
- nsg_http_port
- nsg_https_port
- title: "Additional Configuration Options"
variables:
- tag_key_name
- tag_value
######################################################
############## VARIABLES #############
######################################################
variables:
# Hidden variables
######################################################
############## HIDDEN VARIABLES #############
######################################################
tenancy_ocid:
type: string
title: Tenancy ID
description: The Oracle Cloud Identifier (OCID) for your tenancy
required: true
region:
type: oci:identity:region:name
title: Region
description: The region in which to create all resources
required: true
availability_domain_number:
type: string
required: false
description: Availability Domain Number (Not used)
######################################################
############## MARKETPLACE VARIABLES #############
######################################################
mp_listing_id:
type: string
required: true
description: Marketplace Listing ID
mp_listing_resource_id:
type: oci:core:image:id
required: true
description: Marketplace Image OCID
dependsOn:
compartmentId: compute_compartment_ocid
mp_listing_resource_version:
type: string
required: true
description: Marketplace Listing package version
mp_subscription_enabled:
type: boolean
title: Use Marketplace Image?
default: false
custom_image_id:
type: string
required: true
title: Custom Image OCID
# visible:
# eq:
# - mp_subscription_enabled
# - false
tag_key_name:
type: string
required: true
title: Tag key name
tag_value:
type: string
required: true
title: Tag value
######################################################
############## COMPUTE VARIABLES #############
######################################################
compute_compartment_ocid:
type: oci:identity:compartment:id
required: true
title: Compute Compartment
description: The compartment in which to create all Compute resources
default: compartment_ocid
availability_domain_name:
type: oci:identity:availabilitydomain:name
dependsOn:
compartmentId: compute_compartment_ocid
required: true
default: 1
title: Availability Domain
description: Availability Domain
ssh_public_key:
type: oci:core:ssh:publickey
required: true
title: Public SSH Key string
description: Public SSH Key to access VM via SSH
vm_display_name:
type: string
required: true
title: Instance Name
description: The name of the Instance
vm_compute_shape:
type: oci:core:instanceshape:name
default: VM.Standard2.2
title: Compute Shape
required: true
dependsOn:
compartmentId: compute_compartment_ocid
#Comment in to restrict to marketplace image allowed shapes
#imageId: mp_listing_resource_id
vm_flex_shape_ocpus:
visible: #($vm_compute_shape == ""VM.Standard.E3.Flex"")
eq:
- vm_compute_shape
- "VM.Standard.E3.Flex"
type: integer
default: 2
title: Flex Shape OCPUs
minimum: 1
maximum: 64
required: false
hostname_label:
type: string
required: false
title: DNS Hostname Label
######################################################
############## NETWORK VARIABLES #############
######################################################
network_compartment_ocid:
type: oci:identity:compartment:id
required: true
title: Network Compartment
description: The compartment in which to create all Network resources
default: compartment_ocid
# Network Type Options
network_strategy:
type: enum
title: Network Strategy
description: Create or use existing Network Stack (VCN and Subnet)
enum:
- "Create New VCN and Subnet"
- "Use Existing VCN and Subnet"
required: true
default: "Create New VCN and Subnet"
# Network Configuration
network_configuration_strategy:
visible: #($network_strategy == ""Create New VCN and Subnet"")
eq:
- network_strategy
- "Create New VCN and Subnet"
type: enum
title: Configuration Strategy
description: Use recommended configuration or customize it
enum:
- "Use Recommended Configuration"
- "Customize Network Configuration"
required: true
default: "Use Recommended Configuration"
######## VCN ########
vcn_display_name:
visible: #($network_strategy == ""Create New VCN and Subnet"") AND (network_configuration_strategy == "Customize Network Configuration")
and:
- eq:
- network_strategy
- "Create New VCN and Subnet"
- eq:
- network_configuration_strategy
- "Customize Network Configuration"
type: string
required: true
title: Name
description: The name of the new Virtual Cloud Network (VCN)
vcn_id:
visible: #($network_strategy == "Use Existing VCN and Subnet")
eq:
- network_strategy
- "Use Existing VCN and Subnet"
type: oci:core:vcn:id
dependsOn:
compartmentId: network_compartment_ocid
required: true
title: Existing VCN
description: An existing Virtual Cloud Network (VCN) in which to create the compute instances, network resources, and load balancers. If not specified, a new VCN is created.
vcn_cidr_block:
visible: #($network_strategy == ""Create New VCN and Subnet"") AND (network_configuration_strategy == "Customize Network Configuration")
and:
- eq:
- network_strategy
- "Create New VCN and Subnet"
- eq:
- network_configuration_strategy
- "Customize Network Configuration"
type: string
required: true
pattern: "^(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]).(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]).(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]).(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\\/(3[0-2]|[1-2]?[0-9])$"
title: CIDR Block
description: The CIDR of the new Virtual Cloud Network (VCN). If you plan to peer this VCN with another VCN, the VCNs must not have overlapping CIDRs.
vcn_dns_label:
visible: #($network_strategy == ""Create New VCN and Subnet"") AND (network_configuration_strategy == "Customize Network Configuration")
and:
- eq:
- network_strategy
- "Create New VCN and Subnet"
- eq:
- network_configuration_strategy
- "Customize Network Configuration"
type: string
required: true
title: DNS Label
maxLenght: 15
description: VCN DNS Label. Only letters and numbers, starting with a letter. 15 characters max.
######## MANAGEMENT SUBNET ########
subnet_type:
visible: #($network_strategy == ""Create New VCN and Subnet"")
eq:
- network_strategy
- "Create New VCN and Subnet"
type: enum
title: Subnet Type
description: Choose between private and public subnets
enum:
- "Private Subnet"
- "Public Subnet"
required: true
default: "Public Subnet"
subnet_display_name:
visible: #($network_strategy == ""Create New VCN and Subnet"")
eq:
- network_strategy
- "Create New VCN and Subnet"
type: string
required: true
title: Name
description: The name of the new Subnet
subnet_cidr_block:
visible: #($network_strategy == ""Create New VCN and Subnet"")
eq:
- network_strategy
- "Create New VCN and Subnet"
type: string
pattern: "^(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]).(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]).(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]).(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\\/(3[0-2]|[1-2]?[0-9])$"
required: true
title: CIDR Block
description: The CIDR of the new Subnet. The new subnet's CIDR should not overlap with any other subnet CIDRs.
subnet_id:
visible: #($network_strategy == "Use Existing VCN and Subnet")
eq:
- network_strategy
- "Use Existing VCN and Subnet"
type: oci:core:subnet:id
dependsOn:
vcnId: vcn_id
compartmentId: network_compartment_ocid
default: ''
required: true
title: Existing Subnet
description: An existing Management subnet. This subnet must already be present in the chosen VCN.
subnet_dns_label:
visible: #($network_strategy == ""Create New VCN and Subnet"")
eq:
- network_strategy
- "Create New VCN and Subnet"
type: string
required: true
title: DNS Label
maxLenght: 15
description: Subnet DNS Label. Only letters and numbers, starting with a letter. 15 characters max.
######################################################
############## SECURITY VARIABLES #############
######################################################
nsg_configuration_strategy:
visible: true
type: enum
title: Network Security Group Configuration
description: Choose Network Security Rules Strategy
enum:
- "Use Recommended Configuration"
- "Customize Network Security Group"
required: true
default: "Use Recommended Configuration"
nsg_display_name:
type: string
required: false
title: Name
nsg_ssh_port:
type: number
required: false
default: 22
title: SSH Port Number
nsg_http_port:
type: number
required: false
default: 80
title: HTTP Port Number
nsg_https_port:
type: number
required: false
default: 443
title: HTTPS Port Number
nsg_source_cidr:
type: string
required: false
default: "0.0.0.0/0"
title: Allowed Ingress Traffic (CIDR Block)
#############################################
########### OUTPUT GROUPS ############
#############################################
outputGroups:
- title: "Instance Management"
outputs:
- instance_public_ip
- instance_private_ip
#############################################
############## OUTPUTS ##############
#############################################
outputs:
instance_https_url:
type: link
title: Open Application URL
visible: false
instance_public_ip:
type: link
title: Public IP
visible: #($mgmt_subnet_type == "Public Subnet")
eq:
- mgmt_subnet_type
- "Public Subnet"
instance_private_ip:
type: link
title: Private IP
visible: true
primaryOutputButton: instance_https_url