Make Disk KMS features GA

Signed-off-by: Modular Magician <magic-modules@google.com>
This commit is contained in:
Chris Stephens 2019-01-16 03:25:06 +00:00 committed by Alex Stephen
commit 2bd4f747f9
2 changed files with 63 additions and 9 deletions

View file

@ -129,6 +129,10 @@ options:
- The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption - The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption
key that protects this resource. key that protects this resource.
required: false required: false
kms_key_name:
description:
- The name of the encryption key that is stored in Google Cloud KMS.
required: false
disk_encryption_key: disk_encryption_key:
description: description:
- Encrypts the disk using a customer-supplied encryption key. - Encrypts the disk using a customer-supplied encryption key.
@ -151,6 +155,10 @@ options:
- The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption - The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption
key that protects this resource. key that protects this resource.
required: false required: false
kms_key_name:
description:
- The name of the encryption key that is stored in Google Cloud KMS.
required: false
source_snapshot: source_snapshot:
description: description:
- The source snapshot used to create this disk. You can provide this as a partial - The source snapshot used to create this disk. You can provide this as a partial
@ -171,6 +179,10 @@ options:
- Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 - Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648
base64 to either encrypt or decrypt this resource. base64 to either encrypt or decrypt this resource.
required: false required: false
kms_key_name:
description:
- The name of the encryption key that is stored in Google Cloud KMS.
required: false
sha256: sha256:
description: description:
- The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption - The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption
@ -310,6 +322,11 @@ sourceImageEncryptionKey:
key that protects this resource. key that protects this resource.
returned: success returned: success
type: str type: str
kmsKeyName:
description:
- The name of the encryption key that is stored in Google Cloud KMS.
returned: success
type: str
sourceImageId: sourceImageId:
description: description:
- The ID value of the image used to create this disk. This value identifies the - The ID value of the image used to create this disk. This value identifies the
@ -344,6 +361,11 @@ diskEncryptionKey:
key that protects this resource. key that protects this resource.
returned: success returned: success
type: str type: str
kmsKeyName:
description:
- The name of the encryption key that is stored in Google Cloud KMS.
returned: success
type: str
sourceSnapshot: sourceSnapshot:
description: description:
- The source snapshot used to create this disk. You can provide this as a partial - The source snapshot used to create this disk. You can provide this as a partial
@ -363,6 +385,11 @@ sourceSnapshotEncryptionKey:
base64 to either encrypt or decrypt this resource. base64 to either encrypt or decrypt this resource.
returned: success returned: success
type: str type: str
kmsKeyName:
description:
- The name of the encryption key that is stored in Google Cloud KMS.
returned: success
type: str
sha256: sha256:
description: description:
- The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption - The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption
@ -409,10 +436,10 @@ def main():
type=dict(type='str'), type=dict(type='str'),
source_image=dict(type='str'), source_image=dict(type='str'),
zone=dict(required=True, type='str'), zone=dict(required=True, type='str'),
source_image_encryption_key=dict(type='dict', options=dict(raw_key=dict(type='str'), sha256=dict(type='str'))), source_image_encryption_key=dict(type='dict', options=dict(raw_key=dict(type='str'), sha256=dict(type='str'), kms_key_name=dict(type='str'))),
disk_encryption_key=dict(type='dict', options=dict(raw_key=dict(type='str'), sha256=dict(type='str'))), disk_encryption_key=dict(type='dict', options=dict(raw_key=dict(type='str'), sha256=dict(type='str'), kms_key_name=dict(type='str'))),
source_snapshot=dict(), source_snapshot=dict(),
source_snapshot_encryption_key=dict(type='dict', options=dict(raw_key=dict(type='str'), sha256=dict(type='str'))), source_snapshot_encryption_key=dict(type='dict', options=dict(raw_key=dict(type='str'), kms_key_name=dict(type='str'), sha256=dict(type='str'))),
) )
) )
@ -633,10 +660,14 @@ class DiskSourceimageencryptionkey(object):
self.request = {} self.request = {}
def to_request(self): def to_request(self):
return remove_nones_from_dict({u'rawKey': self.request.get('raw_key'), u'sha256': self.request.get('sha256')}) return remove_nones_from_dict(
{u'rawKey': self.request.get('raw_key'), u'sha256': self.request.get('sha256'), u'kmsKeyName': self.request.get('kms_key_name')}
)
def from_response(self): def from_response(self):
return remove_nones_from_dict({u'rawKey': self.request.get(u'rawKey'), u'sha256': self.request.get(u'sha256')}) return remove_nones_from_dict(
{u'rawKey': self.request.get(u'rawKey'), u'sha256': self.request.get(u'sha256'), u'kmsKeyName': self.request.get(u'kmsKeyName')}
)
class DiskDiskencryptionkey(object): class DiskDiskencryptionkey(object):
@ -648,10 +679,14 @@ class DiskDiskencryptionkey(object):
self.request = {} self.request = {}
def to_request(self): def to_request(self):
return remove_nones_from_dict({u'rawKey': self.request.get('raw_key'), u'sha256': self.request.get('sha256')}) return remove_nones_from_dict(
{u'rawKey': self.request.get('raw_key'), u'sha256': self.request.get('sha256'), u'kmsKeyName': self.request.get('kms_key_name')}
)
def from_response(self): def from_response(self):
return remove_nones_from_dict({u'rawKey': self.request.get(u'rawKey'), u'sha256': self.request.get(u'sha256')}) return remove_nones_from_dict(
{u'rawKey': self.request.get(u'rawKey'), u'sha256': self.request.get(u'sha256'), u'kmsKeyName': self.request.get(u'kmsKeyName')}
)
class DiskSourcesnapshotencryptionkey(object): class DiskSourcesnapshotencryptionkey(object):
@ -663,10 +698,14 @@ class DiskSourcesnapshotencryptionkey(object):
self.request = {} self.request = {}
def to_request(self): def to_request(self):
return remove_nones_from_dict({u'rawKey': self.request.get('raw_key'), u'sha256': self.request.get('sha256')}) return remove_nones_from_dict(
{u'rawKey': self.request.get('raw_key'), u'kmsKeyName': self.request.get('kms_key_name'), u'sha256': self.request.get('sha256')}
)
def from_response(self): def from_response(self):
return remove_nones_from_dict({u'rawKey': self.request.get(u'rawKey'), u'sha256': self.request.get(u'sha256')}) return remove_nones_from_dict(
{u'rawKey': self.request.get(u'rawKey'), u'kmsKeyName': self.request.get(u'kmsKeyName'), u'sha256': self.request.get(u'sha256')}
)
if __name__ == '__main__': if __name__ == '__main__':

View file

@ -183,6 +183,11 @@ items:
key that protects this resource. key that protects this resource.
returned: success returned: success
type: str type: str
kmsKeyName:
description:
- The name of the encryption key that is stored in Google Cloud KMS.
returned: success
type: str
sourceImageId: sourceImageId:
description: description:
- The ID value of the image used to create this disk. This value identifies - The ID value of the image used to create this disk. This value identifies
@ -218,6 +223,11 @@ items:
key that protects this resource. key that protects this resource.
returned: success returned: success
type: str type: str
kmsKeyName:
description:
- The name of the encryption key that is stored in Google Cloud KMS.
returned: success
type: str
sourceSnapshot: sourceSnapshot:
description: description:
- The source snapshot used to create this disk. You can provide this as a partial - The source snapshot used to create this disk. You can provide this as a partial
@ -237,6 +247,11 @@ items:
base64 to either encrypt or decrypt this resource. base64 to either encrypt or decrypt this resource.
returned: success returned: success
type: str type: str
kmsKeyName:
description:
- The name of the encryption key that is stored in Google Cloud KMS.
returned: success
type: str
sha256: sha256:
description: description:
- The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption - The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption