Skip to content

Commit e7fc5fd

Browse files
committed
Added compartment id from vault key
1 parent 80c91fe commit e7fc5fd

File tree

2 files changed

+67
-55
lines changed

2 files changed

+67
-55
lines changed

interface.yaml

Lines changed: 61 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ variableGroups:
2727
variables:
2828
- compartment_id
2929
- availability_domain
30-
###APPLICATION_GROUP###
30+
###APPLICATION_GROUP###
3131
- title: "Stack authentication"
3232
variables:
3333
- use_existing_token
@@ -36,6 +36,7 @@ variableGroups:
3636
- new_vault_display_name
3737
- vault_compartment_id
3838
- vault_id
39+
- vault_key_comparment
3940
- key_id
4041
- title: "Application Performance Monitoring"
4142
variables:
@@ -52,7 +53,7 @@ variableGroups:
5253
- autonomous_database
5354
- autonomous_database_user
5455
- autonomous_database_password
55-
###APP_CONFIG_GROUP###
56+
###APP_CONFIG_GROUP###
5657
- title: "Application URL"
5758
variables:
5859
- create_fqdn
@@ -106,7 +107,7 @@ variables:
106107
dependsOn:
107108
compartmentId: ${compartment_id}
108109
# Application
109-
###APPLICATION###
110+
###APPLICATION###
110111
# APM
111112
is_free_tier:
112113
type: boolean
@@ -125,7 +126,7 @@ variables:
125126
required: true
126127
title: Autonomous Database display name
127128
description: A user-friendly name to help you easily identify the resource.
128-
visible:
129+
visible:
129130
not:
130131
- use_existing_database
131132
autonomous_database_admin_password:
@@ -134,17 +135,17 @@ variables:
134135
# validate
135136
description: Password must be 12 to 30 characters and contain at least one uppercase letter, one lowercase letter, and one number. The password cannot contain the double quote (") character or the username "admin".
136137
required: true
137-
138-
visible:
139-
not:
138+
139+
visible:
140+
not:
140141
- use_existing_database
141142
data_storage_size_in_tbs:
142143
type: number
143144
required: true
144145
title: Storage (TB)
145146
description: The amount of storage to allocate.
146147
default: 1
147-
visible:
148+
visible:
148149
not:
149150
- use_existing_database
150151
# cpu_core_count:
@@ -153,7 +154,7 @@ variables:
153154
# title: CPU core count
154155
# description: The number of OCPU cores to be made available to the database
155156
# default: 2
156-
# visible:
157+
# visible:
157158
# not:
158159
# - use_existing_database
159160
ocpu_count:
@@ -162,7 +163,7 @@ variables:
162163
title: OCPU count
163164
description: The number of OCPU cores to enable. Available cores are subject to your tenancy's service limits.
164165
default: 1
165-
visible:
166+
visible:
166167
not:
167168
- use_existing_database
168169
db_compartment:
@@ -171,35 +172,35 @@ variables:
171172
title: Autonomous Database compartment
172173
description: The compartment conataining the Autonomous Database.
173174
default: ${compartment_id}
174-
visible:
175-
and:
176-
- use_existing_database
175+
visible:
176+
and:
177+
- use_existing_database
177178
autonomous_database:
178179
type: oci:database:autonomousdatabase:id
179180
required: true
180181
title: Autonomous Database
181182
description: The Autonomous Database used by the application.
182183
dependsOn:
183184
compartmentId: ${db_compartment}
184-
visible:
185-
and:
185+
visible:
186+
and:
186187
- use_existing_database
187188
autonomous_database_user:
188189
type: string
189190
required: true
190191
title: DB username
191192
default: ""
192193
description: The username used to connect to the database.
193-
visible:
194-
and:
194+
visible:
195+
and:
195196
- use_existing_database
196197
autonomous_database_password:
197198
type: password
198199
title: DB user password
199200
required: true
200201
description: The password of the user used to access the database.
201-
visible:
202-
and:
202+
visible:
203+
and:
203204
- use_existing_database
204205
# Vault
205206
use_existing_vault:
@@ -215,7 +216,7 @@ variables:
215216
required: true
216217
visible:
217218
not:
218-
- use_existing_vault
219+
- use_existing_vault
219220
vault_compartment_id:
220221
type: oci:identity:compartment:id
221222
required: true
@@ -235,13 +236,22 @@ variables:
235236
visible:
236237
and:
237238
- use_existing_vault
239+
vault_key_comparment:
240+
type: oci:identity:compartment:id
241+
required: true
242+
title: Vault key compartment
243+
description: Compartment containing the vault key.
244+
default: compartment_ocid
245+
visible:
246+
and:
247+
- use_existing_vault
238248
key_id:
239249
type: oci:kms:key:id
240250
required: true
241251
title: Encryption key
242252
description: This key will be used to encrypt the sensitive information stored as vault secrets.
243253
dependsOn:
244-
compartmentId: ${vault_compartment_id}
254+
compartmentId: ${vault_key_comparment}
245255
vaultId: ${vault_id}
246256
visible:
247257
and:
@@ -257,13 +267,13 @@ variables:
257267
required: true
258268
title: User's authentication token
259269
visible: use_existing_token
260-
###APP_CONFIG###
270+
###APP_CONFIG###
261271
# FQDN
262272
create_fqdn:
263-
type : boolean
273+
type: boolean
264274
required: true
265275
default: true
266-
title : Create DNS record
276+
title: Create DNS record
267277
description: If you check this checkbox the stack will create a DNS record that will resolve to the load balancer's IP address.
268278
dns_compartment:
269279
type: oci:identity:compartment:id
@@ -272,24 +282,24 @@ variables:
272282
title: DNS and Certificate compartement
273283
description: Compartment containing the DNS Zone and the Certificate
274284
visible: create_fqdn
275-
zone :
285+
zone:
276286
type: string
277287
required: true
278288
title: DNS Zone
279-
description : Domain name in which the host name will be created.
280-
visible : create_fqdn
289+
description: Domain name in which the host name will be created.
290+
visible: create_fqdn
281291
subdomain:
282292
type: string
283293
required: true
284294
title: Host name
285295
description: The host name will be created on the selected Zone and will resolve to the the load balancer's IP address.
286-
visible : create_fqdn
296+
visible: create_fqdn
287297
certificate_ocid:
288298
type: string
289299
required: true
290300
title: Certificate OCID
291301
description: You must have a SSL certificate available in OCI Certificates service. Provide the certificate OCID for the host name.
292-
visible : create_fqdn
302+
visible: create_fqdn
293303
# Network
294304
create_new_vcn:
295305
type: boolean
@@ -301,14 +311,14 @@ variables:
301311
required: true
302312
title: The compartment of the existing VCN.
303313
default: compartment_ocid
304-
visible:
314+
visible:
305315
not:
306316
- create_new_vcn
307317
existing_vcn_id:
308318
type: oci:core:vcn:id
309319
required: true
310320
title: Select to VCN
311-
visible:
321+
visible:
312322
not:
313323
- create_new_vcn
314324
dependsOn:
@@ -326,8 +336,8 @@ variables:
326336
required: true
327337
title: Use existing Application Subnet
328338
default: false
329-
visible:
330-
not :
339+
visible:
340+
not:
331341
- create_new_vcn
332342
existing_app_subnet_id:
333343
type: oci:core:subnet:id
@@ -354,11 +364,11 @@ variables:
354364
title: Use existing Database Subnet
355365
default: false
356366
visible:
357-
and:
358-
- not:
359-
- create_new_vcn
367+
and:
360368
- not:
361-
- use_existing_database
369+
- create_new_vcn
370+
- not:
371+
- use_existing_database
362372
existing_db_subnet_id:
363373
type: oci:core:subnet:id
364374
required: true
@@ -371,23 +381,23 @@ variables:
371381
db_subnet_cidr:
372382
type: string
373383
required: true
374-
title: 'Database Subnet Creation: IPv4 CIDR Blocks'
375-
description: 'The Autonomous Database will be created in this subnet. For example: 10.0.0.128/26'
384+
title: "Database Subnet Creation: IPv4 CIDR Blocks"
385+
description: "The Autonomous Database will be created in this subnet. For example: 10.0.0.128/26"
376386
default: "10.0.0.128/26"
377387
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])$"
378-
visible:
388+
visible:
379389
and:
380-
- not:
381-
- use_existing_db_subnet
382390
- not:
383-
- use_existing_database
391+
- use_existing_db_subnet
392+
- not:
393+
- use_existing_database
384394
use_existing_lb_subnet:
385395
type: boolean
386396
required: true
387397
title: Use existing Load Balancer Subnet
388398
default: false
389-
visible:
390-
not :
399+
visible:
400+
not:
391401
- create_new_vcn
392402
existing_lb_subnet_id:
393403
type: oci:core:subnet:id
@@ -405,15 +415,15 @@ variables:
405415
description: The load balancer will be created in this subnet.
406416
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])$"
407417
default: "10.0.0.192/26"
408-
visible:
418+
visible:
409419
not:
410420
- use_existing_lb_subnet
411421
open_https_port:
412422
type: boolean
413423
required: true
414424
title: Open load balancer's HTTPS port
415-
description: By checking this checkbox you agree to make the load balancer
416-
subnet public and to open the HTTPS port of the load balancer to the
425+
description: By checking this checkbox you agree to make the load balancer
426+
subnet public and to open the HTTPS port of the load balancer to the
417427
Internet.
418428
default: false
419429
# Container instances configuration
@@ -452,7 +462,7 @@ variables:
452462
type: number
453463
required: true
454464
title: Maximum bandwidth (Mbps)
455-
description : 10Mbps for always free load balancer
465+
description: 10Mbps for always free load balancer
456466
default: 10
457467
visible:
458468
not:
@@ -461,7 +471,7 @@ variables:
461471
type: number
462472
required: true
463473
title: Minimum bandwidth (Mbps)
464-
description : 10Mbps for always free load balancer
474+
description: 10Mbps for always free load balancer
465475
default: 10
466476
visible:
467477
not:
@@ -489,7 +499,7 @@ variables:
489499
required: true
490500
default: false
491501
title: Enable cookie-based session persistence
492-
visible:
502+
visible:
493503
not: use_default_lb_configuration
494504
session_affinity:
495505
type: enum
@@ -518,7 +528,3 @@ outputs:
518528
type: link
519529
title: Application URL
520530
visible: true
521-
522-
523-
524-

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,12 @@ variable "new_vault_display_name" {
394394
default = ""
395395
}
396396

397+
variable "vault_key_comparment" {
398+
type = string
399+
description = "Vault encryption key compartment"
400+
default = ""
401+
}
402+
397403
variable "is_free_tier" {
398404
type = bool
399405
description = "APM free tier"

0 commit comments

Comments
 (0)