Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
Make Disk KMS features GA
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
chrisst authored and modular-magician committed Jan 16, 2019
1 parent 7f25be6 commit 60ea73f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/resources/google_compute_disk.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ Properties that can be accessed from the `google_compute_disk` resource:

* `sha256`: The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.

* `kmsKeyName`: The name of the encryption key that is stored in Google Cloud KMS.

* `source_image_id`: The ID value of the image used to create this disk. This value identifies the exact image that was used to create this persistent disk. For example, if you created the persistent disk from an image that was later deleted and recreated under the same name, the source image ID would identify the exact version of the image that was used.

* `disk_encryption_key`: Encrypts the disk using a customer-supplied encryption key. After you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later (e.g. to create a disk snapshot or an image, or to attach the disk to a virtual machine). Customer-supplied encryption keys do not protect access to metadata of the disk. If you do not provide an encryption key when creating the disk, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later.
Expand All @@ -77,12 +79,16 @@ Properties that can be accessed from the `google_compute_disk` resource:

* `sha256`: The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.

* `kmsKeyName`: The name of the encryption key that is stored in Google Cloud KMS.

* `source_snapshot`: The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid values: * `https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot` * `projects/project/global/snapshots/snapshot` * `global/snapshots/snapshot`

* `source_snapshot_encryption_key`: The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.

* `rawKey`: Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.

* `kmsKeyName`: The name of the encryption key that is stored in Google Cloud KMS.

* `sha256`: The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.

* `source_snapshot_id`: The unique ID of the snapshot used to create this disk. This value identifies the exact snapshot that was used to create this persistent disk. For example, if you created the persistent disk from a snapshot that was later deleted and recreated under the same name, the source snapshot ID would identify the exact version of the snapshot that was used.
3 changes: 3 additions & 0 deletions libraries/google/compute/property/disk_disk_encryption_key.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@ class DiskDiskencryptionkey

attr_reader :sha256

attr_reader :kms_key_name

def initialize(args = nil)
return if args.nil?
@raw_key = args['rawKey']
@sha256 = args['sha256']
@kms_key_name = args['kmsKeyName']
end
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@ class DiskSourceimageencryptionkey

attr_reader :sha256

attr_reader :kms_key_name

def initialize(args = nil)
return if args.nil?
@raw_key = args['rawKey']
@sha256 = args['sha256']
@kms_key_name = args['kmsKeyName']
end
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@ module Property
class DiskSourcesnapshotencryptionkey
attr_reader :raw_key

attr_reader :kms_key_name

attr_reader :sha256

def initialize(args = nil)
return if args.nil?
@raw_key = args['rawKey']
@kms_key_name = args['kmsKeyName']
@sha256 = args['sha256']
end
end
Expand Down

0 comments on commit 60ea73f

Please sign in to comment.