Skip to content

Commit 290899b

Browse files
Umm-E-KulsumUMM KULSUMayushmjain
authored
feat(vm): Add blueprint metadata for compute_instance module (#539)
Co-authored-by: UMM KULSUM <kulsumeumm@google.com> Co-authored-by: Ayush Jain <124978972+ayushmjain@users.noreply.github.com>
1 parent 0a1a975 commit 290899b

File tree

2 files changed

+275
-0
lines changed

2 files changed

+275
-0
lines changed

modules/compute_instance/metadata.display.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ spec:
4343
hostname:
4444
name: hostname
4545
title: Hostname
46+
level: 1
4647
hostname_suffix_separator:
4748
name: hostname_suffix_separator
4849
title: Hostname Suffix Separator
@@ -61,6 +62,7 @@ spec:
6162
num_instances:
6263
name: num_instances
6364
title: Num Instances
65+
level: 1
6466
region:
6567
name: region
6668
title: Region
@@ -82,3 +84,4 @@ spec:
8284
zone:
8385
name: zone
8486
title: Zone
87+
level: 1

modules/compute_instance/metadata.yaml

Lines changed: 272 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ spec:
9090
description: Subnet to deploy to. Only one of network or subnetwork should be specified.
9191
varType: string
9292
defaultValue: ""
93+
connections:
94+
- source:
95+
source: github.com/terraform-google-modules/terraform-google-network//modules/subnets
96+
version: ~> 6.0
97+
spec:
98+
outputExpr: subnets[0].self_link
9399
- name: subnetwork_project
94100
description: The project that subnetwork belongs to
95101
varType: string
@@ -106,6 +112,12 @@ spec:
106112
description: List of static IPs for VM instances
107113
varType: list(string)
108114
defaultValue: []
115+
connections:
116+
- source:
117+
source: github.com/terraform-google-modules/terraform-google-address
118+
version: ~> 4.2
119+
spec:
120+
outputExpr: addresses
109121
- name: access_config
110122
description: Access configurations, i.e. IPs via which the VM instance can be accessed via the Internet.
111123
varType: |-
@@ -129,6 +141,12 @@ spec:
129141
description: Instance template self_link used to create compute instances
130142
varType: string
131143
required: true
144+
connections:
145+
- source:
146+
source: github.com/terraform-google-modules/terraform-google-vm//modules/instance_template
147+
version: ~> 13.6
148+
spec:
149+
outputExpr: self_link
132150
- name: region
133151
description: Region where the instances should be created.
134152
varType: string
@@ -164,10 +182,264 @@ spec:
164182
outputs:
165183
- name: available_zones
166184
description: List of available zones in region
185+
type:
186+
- list
187+
- string
167188
- name: instances_details
168189
description: List of all details for compute instances
190+
type:
191+
- list
192+
- - - object
193+
- advanced_machine_features:
194+
- list
195+
- - object
196+
- enable_nested_virtualization: bool
197+
enable_uefi_networking: bool
198+
performance_monitoring_unit: string
199+
threads_per_core: number
200+
turbo_mode: string
201+
visible_core_count: number
202+
allow_stopping_for_update: bool
203+
attached_disk:
204+
- list
205+
- - object
206+
- device_name: string
207+
disk_encryption_key_raw: string
208+
disk_encryption_key_rsa: string
209+
disk_encryption_key_sha256: string
210+
disk_encryption_service_account: string
211+
force_attach: bool
212+
kms_key_self_link: string
213+
mode: string
214+
source: string
215+
boot_disk:
216+
- list
217+
- - object
218+
- auto_delete: bool
219+
device_name: string
220+
disk_encryption_key_raw: string
221+
disk_encryption_key_rsa: string
222+
disk_encryption_key_sha256: string
223+
disk_encryption_service_account: string
224+
force_attach: bool
225+
guest_os_features:
226+
- list
227+
- string
228+
initialize_params:
229+
- list
230+
- - object
231+
- architecture: string
232+
enable_confidential_compute: bool
233+
image: string
234+
labels:
235+
- map
236+
- string
237+
provisioned_iops: number
238+
provisioned_throughput: number
239+
resource_manager_tags:
240+
- map
241+
- string
242+
resource_policies:
243+
- list
244+
- string
245+
size: number
246+
snapshot: string
247+
source_image_encryption_key:
248+
- list
249+
- - object
250+
- kms_key_self_link: string
251+
kms_key_service_account: string
252+
raw_key: string
253+
rsa_encrypted_key: string
254+
sha256: string
255+
source_snapshot_encryption_key:
256+
- list
257+
- - object
258+
- kms_key_self_link: string
259+
kms_key_service_account: string
260+
raw_key: string
261+
rsa_encrypted_key: string
262+
sha256: string
263+
storage_pool: string
264+
type: string
265+
interface: string
266+
kms_key_self_link: string
267+
mode: string
268+
source: string
269+
can_ip_forward: bool
270+
confidential_instance_config:
271+
- list
272+
- - object
273+
- confidential_instance_type: string
274+
enable_confidential_compute: bool
275+
cpu_platform: string
276+
creation_timestamp: string
277+
current_status: string
278+
deletion_protection: bool
279+
description: string
280+
desired_status: string
281+
effective_labels:
282+
- map
283+
- string
284+
enable_display: bool
285+
guest_accelerator:
286+
- list
287+
- - object
288+
- count: number
289+
type: string
290+
hostname: string
291+
id: string
292+
instance_encryption_key:
293+
- list
294+
- - object
295+
- kms_key_self_link: string
296+
kms_key_service_account: string
297+
sha256: string
298+
instance_id: string
299+
key_revocation_action_type: string
300+
label_fingerprint: string
301+
labels:
302+
- map
303+
- string
304+
machine_type: string
305+
metadata:
306+
- map
307+
- string
308+
metadata_fingerprint: string
309+
metadata_startup_script: string
310+
min_cpu_platform: string
311+
name: string
312+
network_interface:
313+
- list
314+
- - object
315+
- access_config:
316+
- list
317+
- - object
318+
- nat_ip: string
319+
network_tier: string
320+
public_ptr_domain_name: string
321+
alias_ip_range:
322+
- list
323+
- - object
324+
- ip_cidr_range: string
325+
subnetwork_range_name: string
326+
internal_ipv6_prefix_length: number
327+
ipv6_access_config:
328+
- list
329+
- - object
330+
- external_ipv6: string
331+
external_ipv6_prefix_length: string
332+
name: string
333+
network_tier: string
334+
public_ptr_domain_name: string
335+
ipv6_access_type: string
336+
ipv6_address: string
337+
name: string
338+
network: string
339+
network_attachment: string
340+
network_ip: string
341+
nic_type: string
342+
queue_count: number
343+
stack_type: string
344+
subnetwork: string
345+
subnetwork_project: string
346+
network_performance_config:
347+
- list
348+
- - object
349+
- total_egress_bandwidth_tier: string
350+
params:
351+
- list
352+
- - object
353+
- resource_manager_tags:
354+
- map
355+
- string
356+
project: string
357+
reservation_affinity:
358+
- list
359+
- - object
360+
- specific_reservation:
361+
- list
362+
- - object
363+
- key: string
364+
values:
365+
- list
366+
- string
367+
type: string
368+
resource_policies:
369+
- list
370+
- string
371+
scheduling:
372+
- list
373+
- - object
374+
- automatic_restart: bool
375+
availability_domain: number
376+
instance_termination_action: string
377+
local_ssd_recovery_timeout:
378+
- list
379+
- - object
380+
- nanos: number
381+
seconds: number
382+
max_run_duration:
383+
- list
384+
- - object
385+
- nanos: number
386+
seconds: number
387+
min_node_cpus: number
388+
node_affinities:
389+
- list
390+
- - object
391+
- key: string
392+
operator: string
393+
values:
394+
- list
395+
- string
396+
on_host_maintenance: string
397+
on_instance_stop_action:
398+
- list
399+
- - object
400+
- discard_local_ssd: bool
401+
preemptible: bool
402+
provisioning_model: string
403+
termination_time: string
404+
scratch_disk:
405+
- list
406+
- - object
407+
- device_name: string
408+
interface: string
409+
size: number
410+
self_link: string
411+
service_account:
412+
- list
413+
- - object
414+
- email: string
415+
scopes:
416+
- list
417+
- string
418+
shielded_instance_config:
419+
- list
420+
- - object
421+
- enable_integrity_monitoring: bool
422+
enable_secure_boot: bool
423+
enable_vtpm: bool
424+
source_instance_template: string
425+
tags:
426+
- list
427+
- string
428+
tags_fingerprint: string
429+
terraform_labels:
430+
- map
431+
- string
432+
timeouts:
433+
- object
434+
- create: string
435+
delete: string
436+
update: string
437+
zone: string
169438
- name: instances_self_links
170439
description: List of self-links for compute instances
440+
type:
441+
- list
442+
- - string
171443
requirements:
172444
roles:
173445
- level: Project

0 commit comments

Comments
 (0)