Skip to content

Commit 67115cc

Browse files
authored
Adding Datasources for Reservation block and Sub block (#15475)
1 parent b3e72f7 commit 67115cc

File tree

6 files changed

+1043
-0
lines changed

6 files changed

+1043
-0
lines changed

mmv1/products/compute/Reservation.yaml

Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,11 @@ properties:
207207
description: |
208208
How many instances are in use.
209209
output: true
210+
- name: 'assuredCount'
211+
type: Integer
212+
description: |
213+
Indicates how many instances are actually usable currently.
214+
output: true
210215
- name: 'instanceProperties'
211216
type: NestedObject
212217
description: |
@@ -291,6 +296,11 @@ properties:
291296
- 'RECURRENT'
292297
min_version: 'beta'
293298
immutable: true
299+
- name: 'locationHint'
300+
type: String
301+
description: |
302+
An opaque location hint used to place the allocation close to other resources. This field is for use by internal tools that use the public API.
303+
output: true
294304
- name: 'sourceInstanceTemplate'
295305
type: String
296306
description: |
@@ -351,3 +361,184 @@ properties:
351361
immutable: true
352362
ignore_read: true
353363
min_version: 'beta'
364+
- name: 'reservationBlockCount'
365+
type: Integer
366+
description: |
367+
The number of reservation blocks associated with this reservation.
368+
output: true
369+
- name: 'kind'
370+
type: String
371+
description: |
372+
Type of the resource. Always compute#reservations for reservations.
373+
output: true
374+
- name: 'id'
375+
type: String
376+
description: |
377+
The unique identifier for the resource. This identifier is defined by the server.
378+
output: true
379+
- name: 'linkedCommitments'
380+
type: Array
381+
description: |
382+
Full or partial URL to parent commitments. This field displays for reservations that are tied to multiple commitments.
383+
output: true
384+
item_type:
385+
type: String
386+
- name: 'satisfiesPzs'
387+
type: Boolean
388+
description: |
389+
Reserved for future use.
390+
output: true
391+
- name: 'resourceStatus'
392+
type: NestedObject
393+
description: |
394+
Status information for Reservation resource.
395+
output: true
396+
properties:
397+
- name: 'specificSkuAllocation'
398+
type: NestedObject
399+
description: |
400+
Allocation Properties of this reservation.
401+
output: true
402+
properties:
403+
- name: 'sourceInstanceTemplateId'
404+
type: String
405+
description: |
406+
ID of the instance template used to populate reservation properties.
407+
output: true
408+
- name: 'utilizations'
409+
type: KeyValuePairs
410+
description: |
411+
Per service utilization breakdown. The Key is the Google Cloud managed service name.
412+
output: true
413+
- name: 'reservationMaintenance'
414+
type: NestedObject
415+
description: |
416+
Maintenance information for this reservation
417+
output: true
418+
properties:
419+
- name: 'upcomingGroupMaintenance'
420+
type: NestedObject
421+
description: |
422+
Maintenance information on this group of VMs.
423+
output: true
424+
properties:
425+
- name: 'type'
426+
type: Enum
427+
description: |
428+
Defines the type of maintenance.
429+
output: true
430+
enum_values:
431+
- 'SCHEDULED'
432+
- 'UNSCHEDULED'
433+
- name: 'canReschedule'
434+
type: Boolean
435+
description: |
436+
Indicates if the maintenance can be customer triggered.
437+
output: true
438+
- name: 'windowStartTime'
439+
type: String
440+
description: |
441+
The current start time of the maintenance window. This timestamp value is in RFC3339 text format.
442+
output: true
443+
- name: 'windowEndTime'
444+
type: String
445+
description: |
446+
The time by which the maintenance disruption will be completed. This timestamp value is in RFC3339 text format.
447+
output: true
448+
- name: 'latestWindowStartTime'
449+
type: String
450+
description: |
451+
The latest time for the planned maintenance window to start. This timestamp value is in RFC3339 text format.
452+
output: true
453+
- name: 'maintenanceStatus'
454+
type: Enum
455+
description: |
456+
Status of the maintenance.
457+
output: true
458+
enum_values:
459+
- 'PENDING'
460+
- 'ONGOING'
461+
- 'COMPLETED'
462+
- name: 'maintenanceOnShutdown'
463+
type: Boolean
464+
description: |
465+
Indicates whether the UpcomingMaintenance will be triggered on VM shutdown.
466+
output: true
467+
- name: 'maintenanceReasons'
468+
type: Array
469+
description: |
470+
The reasons for the maintenance. Only valid for vms.
471+
output: true
472+
item_type:
473+
type: Enum
474+
enum_values:
475+
- 'UNKNOWN_REASON'
476+
- 'HOST_MAINTENANCE'
477+
- name: 'maintenanceOngoingCount'
478+
type: Integer
479+
description: |
480+
Progress for ongoing maintenance for this group of VMs/hosts. Describes number of hosts in the block that have ongoing maintenance.
481+
output: true
482+
- name: 'maintenancePendingCount'
483+
type: Integer
484+
description: |
485+
Progress for ongoing maintenance for this group of VMs/hosts. Describes number of hosts in the block that have pending maintenance.
486+
output: true
487+
- name: 'schedulingType'
488+
type: Enum
489+
description: |
490+
The type of maintenance for the reservation.
491+
output: true
492+
enum_values:
493+
- 'PERIODIC'
494+
- 'AS_NEEDED'
495+
- name: 'subblockInfraMaintenanceOngoingCount'
496+
type: Integer
497+
description: |
498+
Describes number of subblock Infrastructure that has ongoing maintenance. Here, Subblock Infrastructure Maintenance pertains to upstream hardware contained in the Subblock that is necessary for a VM Family(e.g. NVLink Domains). Not all VM Families will support this field.
499+
output: true
500+
- name: 'subblockInfraMaintenancePendingCount'
501+
type: Integer
502+
description: |
503+
Describes number of subblock Infrastructure that has pending maintenance. Here, Subblock Infrastructure Maintenance pertains to upstream hardware contained in the Subblock that is necessary for a VM Family (e.g. NVLink Domains). Not all VM Families will support this field.
504+
output: true
505+
- name: 'instanceMaintenanceOngoingCount'
506+
type: Integer
507+
description: |
508+
Describes number of instances that have ongoing maintenance.
509+
output: true
510+
- name: 'instanceMaintenancePendingCount'
511+
type: Integer
512+
description: |
513+
Describes number of instances that have pending maintenance.
514+
output: true
515+
- name: 'reservationBlockCount'
516+
type: Integer
517+
description: |
518+
The number of reservation blocks associated with this reservation.
519+
output: true
520+
- name: 'healthInfo'
521+
type: NestedObject
522+
description: |
523+
Health information for the reservation.
524+
output: true
525+
properties:
526+
- name: 'healthStatus'
527+
type: Enum
528+
description: |
529+
The health status of the reservation.
530+
output: true
531+
enum_values:
532+
- 'HEALTHY'
533+
- 'DEGRADED'
534+
- 'UNHEALTHY'
535+
- name: 'healthyBlockCount'
536+
type: Integer
537+
description: |
538+
The number of reservation blocks that are healthy.
539+
output: true
540+
- name: 'degradedBlockCount'
541+
type: Integer
542+
description: |
543+
The number of reservation blocks that are degraded.
544+
output: true

mmv1/third_party/terraform/provider/provider_mmv1_resources.go.tmpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ var handwrittenDatasources = map[string]*schema.Resource{
129129
"google_compute_region_ssl_certificate": compute.DataSourceGoogleRegionComputeSslCertificate(),
130130
"google_compute_region_ssl_policy": compute.DataSourceGoogleRegionComputeSslPolicy(),
131131
"google_compute_reservation": compute.DataSourceGoogleComputeReservation(),
132+
"google_compute_reservation_block": compute.DataSourceGoogleComputeReservationBlock(),
133+
"google_compute_reservation_sub_block": compute.DataSourceGoogleComputeReservationSubBlock(),
132134
"google_compute_resource_policy": compute.DataSourceGoogleComputeResourcePolicy(),
133135
"google_compute_router": compute.DataSourceGoogleComputeRouter(),
134136
"google_compute_router_nat": compute.DataSourceGoogleComputeRouterNat(),

0 commit comments

Comments
 (0)