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

Commit

Permalink
Terraform: Support for (Regional)Disk physicalBlockSizeBytes (#211)
Browse files Browse the repository at this point in the history
<!-- This change is generated by MagicModules. -->
/cc @drebes
  • Loading branch information
modular-magician authored and rileykarson committed Mar 13, 2019
1 parent 295a10a commit 382b07a
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 0 deletions.
21 changes: 21 additions & 0 deletions lib/ansible/modules/cloud/google/gcp_compute_disk.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,15 @@
of sizeGb must not be less than the size of the sourceImage or the size of the
snapshot.
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:
description:
- URL of the disk type resource describing which disk type to use to create the
Expand Down Expand Up @@ -262,6 +271,15 @@
.'
returned: success
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:
description:
- URL of the disk type resource describing which disk type to use to create the
Expand Down Expand Up @@ -417,6 +435,7 @@ def main():
licenses=dict(type='list', elements='str'),
name=dict(required=True, type='str'),
size_gb=dict(type='int'),
physical_block_size_bytes=dict(type='int'),
type=dict(type='str'),
source_image=dict(type='str'),
zone=dict(required=True, type='str'),
Expand Down Expand Up @@ -507,6 +526,7 @@ def resource_to_request(module):
u'licenses': module.params.get('licenses'),
u'name': module.params.get('name'),
u'sizeGb': module.params.get('size_gb'),
u'physicalBlockSizeBytes': module.params.get('physical_block_size_bytes'),
u'type': disk_type_selflink(module.params.get('type'), module.params),
u'sourceImage': module.params.get('source_image'),
}
Expand Down Expand Up @@ -585,6 +605,7 @@ def response_to_hash(module, response):
u'name': module.params.get('name'),
u'sizeGb': response.get(u'sizeGb'),
u'users': response.get(u'users'),
u'physicalBlockSizeBytes': response.get(u'physicalBlockSizeBytes'),
u'type': response.get(u'type'),
u'sourceImage': module.params.get('source_image'),
}
Expand Down
9 changes: 9 additions & 0 deletions lib/ansible/modules/cloud/google/gcp_compute_disk_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,15 @@
.'
returned: success
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:
description:
- URL of the disk type resource describing which disk type to use to create
Expand Down
20 changes: 20 additions & 0 deletions lib/ansible/modules/cloud/google/gcp_compute_region_disk.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@
of sizeGb must not be less than the size of the sourceImage or the size of the
snapshot.
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:
description:
- URLs of the zones where the disk should be replicated to.
Expand Down Expand Up @@ -230,6 +238,15 @@
.'
returned: success
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:
description:
- URLs of the zones where the disk should be replicated to.
Expand Down Expand Up @@ -332,6 +349,7 @@ def main():
licenses=dict(type='list', elements='str'),
name=dict(required=True, type='str'),
size_gb=dict(type='int'),
physical_block_size_bytes=dict(type='int'),
replica_zones=dict(required=True, type='list', elements='str'),
type=dict(type='str'),
region=dict(required=True, type='str'),
Expand Down Expand Up @@ -420,6 +438,7 @@ def resource_to_request(module):
u'licenses': module.params.get('licenses'),
u'name': module.params.get('name'),
u'sizeGb': module.params.get('size_gb'),
u'physicalBlockSizeBytes': module.params.get('physical_block_size_bytes'),
u'replicaZones': module.params.get('replica_zones'),
u'type': region_disk_type_selflink(module.params.get('type'), module.params),
}
Expand Down Expand Up @@ -498,6 +517,7 @@ def response_to_hash(module, response):
u'name': module.params.get('name'),
u'sizeGb': response.get(u'sizeGb'),
u'users': response.get(u'users'),
u'physicalBlockSizeBytes': response.get(u'physicalBlockSizeBytes'),
u'replicaZones': response.get(u'replicaZones'),
u'type': response.get(u'type'),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,15 @@
.'
returned: success
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:
description:
- URLs of the zones where the disk should be replicated to.
Expand Down

0 comments on commit 382b07a

Please sign in to comment.