Terraform: Support for (Regional)Disk physicalBlockSizeBytes (#211)

<!-- This change is generated by MagicModules. -->
/cc @drebes
This commit is contained in:
The Magician 2019-03-13 15:52:54 -07:00 committed by Alex Stephen
parent 6e02269e5b
commit 7ce560f452
4 changed files with 57 additions and 0 deletions

View file

@ -89,6 +89,15 @@ options:
of sizeGb must not be less than the size of the sourceImage or the size of the of sizeGb must not be less than the size of the sourceImage or the size of the
snapshot. snapshot.
required: false required: false
physical_block_size_bytes:
description:
- Physical block size of the persistent disk, in bytes. If not present in a request,
a default value is used. Currently supported sizes are 4096 and 16384, other
sizes may be added in the future.
- If an unsupported value is requested, the error message will list the supported
values for the caller's project.
required: false
version_added: 2.8
type: type:
description: description:
- URL of the disk type resource describing which disk type to use to create the - URL of the disk type resource describing which disk type to use to create the
@ -262,6 +271,15 @@ users:
.' .'
returned: success returned: success
type: list type: list
physicalBlockSizeBytes:
description:
- Physical block size of the persistent disk, in bytes. If not present in a request,
a default value is used. Currently supported sizes are 4096 and 16384, other sizes
may be added in the future.
- If an unsupported value is requested, the error message will list the supported
values for the caller's project.
returned: success
type: int
type: type:
description: description:
- URL of the disk type resource describing which disk type to use to create the - URL of the disk type resource describing which disk type to use to create the
@ -587,6 +605,7 @@ def response_to_hash(module, response):
u'name': module.params.get('name'), u'name': module.params.get('name'),
u'sizeGb': response.get(u'sizeGb'), u'sizeGb': response.get(u'sizeGb'),
u'users': response.get(u'users'), u'users': response.get(u'users'),
u'physicalBlockSizeBytes': response.get(u'physicalBlockSizeBytes'),
u'type': response.get(u'type'), u'type': response.get(u'type'),
u'sourceImage': module.params.get('source_image'), u'sourceImage': module.params.get('source_image'),
} }

View file

@ -138,6 +138,15 @@ items:
.' .'
returned: success returned: success
type: list type: list
physicalBlockSizeBytes:
description:
- Physical block size of the persistent disk, in bytes. If not present in a
request, a default value is used. Currently supported sizes are 4096 and 16384,
other sizes may be added in the future.
- If an unsupported value is requested, the error message will list the supported
values for the caller's project.
returned: success
type: int
type: type:
description: description:
- URL of the disk type resource describing which disk type to use to create - URL of the disk type resource describing which disk type to use to create

View file

@ -88,6 +88,14 @@ options:
of sizeGb must not be less than the size of the sourceImage or the size of the of sizeGb must not be less than the size of the sourceImage or the size of the
snapshot. snapshot.
required: false required: false
physical_block_size_bytes:
description:
- Physical block size of the persistent disk, in bytes. If not present in a request,
a default value is used. Currently supported sizes are 4096 and 16384, other
sizes may be added in the future.
- If an unsupported value is requested, the error message will list the supported
values for the caller's project.
required: false
replica_zones: replica_zones:
description: description:
- URLs of the zones where the disk should be replicated to. - URLs of the zones where the disk should be replicated to.
@ -230,6 +238,15 @@ users:
.' .'
returned: success returned: success
type: list type: list
physicalBlockSizeBytes:
description:
- Physical block size of the persistent disk, in bytes. If not present in a request,
a default value is used. Currently supported sizes are 4096 and 16384, other sizes
may be added in the future.
- If an unsupported value is requested, the error message will list the supported
values for the caller's project.
returned: success
type: int
replicaZones: replicaZones:
description: description:
- URLs of the zones where the disk should be replicated to. - URLs of the zones where the disk should be replicated to.
@ -332,6 +349,7 @@ def main():
licenses=dict(type='list', elements='str'), licenses=dict(type='list', elements='str'),
name=dict(required=True, type='str'), name=dict(required=True, type='str'),
size_gb=dict(type='int'), size_gb=dict(type='int'),
physical_block_size_bytes=dict(type='int'),
replica_zones=dict(required=True, type='list', elements='str'), replica_zones=dict(required=True, type='list', elements='str'),
type=dict(type='str'), type=dict(type='str'),
region=dict(required=True, type='str'), region=dict(required=True, type='str'),
@ -420,6 +438,7 @@ def resource_to_request(module):
u'licenses': module.params.get('licenses'), u'licenses': module.params.get('licenses'),
u'name': module.params.get('name'), u'name': module.params.get('name'),
u'sizeGb': module.params.get('size_gb'), u'sizeGb': module.params.get('size_gb'),
u'physicalBlockSizeBytes': module.params.get('physical_block_size_bytes'),
u'replicaZones': module.params.get('replica_zones'), u'replicaZones': module.params.get('replica_zones'),
u'type': region_disk_type_selflink(module.params.get('type'), module.params), u'type': region_disk_type_selflink(module.params.get('type'), module.params),
} }
@ -498,6 +517,7 @@ def response_to_hash(module, response):
u'name': module.params.get('name'), u'name': module.params.get('name'),
u'sizeGb': response.get(u'sizeGb'), u'sizeGb': response.get(u'sizeGb'),
u'users': response.get(u'users'), u'users': response.get(u'users'),
u'physicalBlockSizeBytes': response.get(u'physicalBlockSizeBytes'),
u'replicaZones': response.get(u'replicaZones'), u'replicaZones': response.get(u'replicaZones'),
u'type': response.get(u'type'), u'type': response.get(u'type'),
} }

View file

@ -138,6 +138,15 @@ items:
.' .'
returned: success returned: success
type: list type: list
physicalBlockSizeBytes:
description:
- Physical block size of the persistent disk, in bytes. If not present in a
request, a default value is used. Currently supported sizes are 4096 and 16384,
other sizes may be added in the future.
- If an unsupported value is requested, the error message will list the supported
values for the caller's project.
returned: success
type: int
replicaZones: replicaZones:
description: description:
- URLs of the zones where the disk should be replicated to. - URLs of the zones where the disk should be replicated to.