diff --git a/docs/resources/google_compute_disk.md b/docs/resources/google_compute_disk.md index c17a7dbfb..2c5536eed 100644 --- a/docs/resources/google_compute_disk.md +++ b/docs/resources/google_compute_disk.md @@ -74,6 +74,8 @@ Properties that can be accessed from the `google_compute_disk` resource: * `resource_policies`: (Beta only) Resource policies applied to this disk for automatic snapshot creations. + * `multi_writer`: (Beta only) Indicates whether or not the disk can be read/write attached to more than one instance. + * `zone`: A reference to the zone where the disk resides. * `source_image_encryption_key`: The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key. diff --git a/docs/resources/google_compute_disks.md b/docs/resources/google_compute_disks.md index 1ff7db122..807eb2f7a 100644 --- a/docs/resources/google_compute_disks.md +++ b/docs/resources/google_compute_disks.md @@ -40,6 +40,7 @@ See [google_compute_disk.md](google_compute_disk.md) for more detailed informati * `types`: an array of `google_compute_disk` type * `source_images`: an array of `google_compute_disk` source_image * `resource_policies`: (Beta only) an array of `google_compute_disk` resource_policies + * `multi_writers`: (Beta only) an array of `google_compute_disk` multi_writer * `zones`: an array of `google_compute_disk` zone * `source_image_encryption_keys`: an array of `google_compute_disk` source_image_encryption_key * `source_image_ids`: an array of `google_compute_disk` source_image_id diff --git a/libraries/google_compute_disk.rb b/libraries/google_compute_disk.rb index 506588f5e..e9a64a595 100644 --- a/libraries/google_compute_disk.rb +++ b/libraries/google_compute_disk.rb @@ -41,6 +41,7 @@ class ComputeDisk < GcpResourceBase attr_reader :type attr_reader :source_image attr_reader :resource_policies + attr_reader :multi_writer attr_reader :zone attr_reader :source_image_encryption_key attr_reader :source_image_id @@ -73,6 +74,7 @@ def parse @type = @fetched['type'] @source_image = @fetched['sourceImage'] @resource_policies = @fetched['resourcePolicies'] + @multi_writer = @fetched['multiWriter'] @zone = @fetched['zone'] @source_image_encryption_key = GoogleInSpec::Compute::Property::DiskSourceImageEncryptionKey.new(@fetched['sourceImageEncryptionKey'], to_s) @source_image_id = @fetched['sourceImageId'] diff --git a/libraries/google_compute_disks.rb b/libraries/google_compute_disks.rb index 9c6117f32..31e232432 100644 --- a/libraries/google_compute_disks.rb +++ b/libraries/google_compute_disks.rb @@ -39,6 +39,7 @@ class ComputeDisks < GcpResourceBase filter_table_config.add(:types, field: :type) filter_table_config.add(:source_images, field: :source_image) filter_table_config.add(:resource_policies, field: :resource_policies) + filter_table_config.add(:multi_writers, field: :multi_writer) filter_table_config.add(:zones, field: :zone) filter_table_config.add(:source_image_encryption_keys, field: :source_image_encryption_key) filter_table_config.add(:source_image_ids, field: :source_image_id) @@ -101,6 +102,7 @@ def transformers 'type' => ->(obj) { return :type, obj['type'] }, 'sourceImage' => ->(obj) { return :source_image, obj['sourceImage'] }, 'resourcePolicies' => ->(obj) { return :resource_policies, obj['resourcePolicies'] }, + 'multiWriter' => ->(obj) { return :multi_writer, obj['multiWriter'] }, 'zone' => ->(obj) { return :zone, obj['zone'] }, 'sourceImageEncryptionKey' => ->(obj) { return :source_image_encryption_key, GoogleInSpec::Compute::Property::DiskSourceImageEncryptionKey.new(obj['sourceImageEncryptionKey'], to_s) }, 'sourceImageId' => ->(obj) { return :source_image_id, obj['sourceImageId'] },