From bbcd8dabe0f5a05cbd5391531ca69808a62607cd Mon Sep 17 00:00:00 2001 From: Alex Stephen Date: Mon, 5 Aug 2019 17:36:02 +0000 Subject: [PATCH] adding labels to instance templates Signed-off-by: Modular Magician --- docs/resources/google_compute_instance_template.md | 2 ++ .../google/compute/property/instancetemplate_properties.rb | 3 +++ 2 files changed, 5 insertions(+) diff --git a/docs/resources/google_compute_instance_template.md b/docs/resources/google_compute_instance_template.md index 9b9371389..eb596b48c 100644 --- a/docs/resources/google_compute_instance_template.md +++ b/docs/resources/google_compute_instance_template.md @@ -45,6 +45,8 @@ Properties that can be accessed from the `google_compute_instance_template` reso * `disks`: An array of disks that are associated with the instances that are created from this template. + * `labels`: Labels to apply to this address. A list of key->value pairs. + * `machine_type`: The machine type to use in the VM instance template. * `min_cpu_platform`: Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms diff --git a/libraries/google/compute/property/instancetemplate_properties.rb b/libraries/google/compute/property/instancetemplate_properties.rb index 46844803f..347a8c0f9 100644 --- a/libraries/google/compute/property/instancetemplate_properties.rb +++ b/libraries/google/compute/property/instancetemplate_properties.rb @@ -29,6 +29,8 @@ class InstanceTemplateProperties attr_reader :disks + attr_reader :labels + attr_reader :machine_type attr_reader :min_cpu_platform @@ -51,6 +53,7 @@ def initialize(args = nil, parent_identifier = nil) @can_ip_forward = args['canIpForward'] @description = args['description'] @disks = GoogleInSpec::Compute::Property::InstanceTemplatePropertiesDisksArray.parse(args['disks'], to_s) + @labels = args['labels'] @machine_type = args['machineType'] @min_cpu_platform = args['minCpuPlatform'] @metadata = args['metadata']