mirror of
https://github.com/ansible-collections/google.cloud.git
synced 2025-07-26 14:41:29 -07:00
Merge pull request #686 from thekad/bug/power_down_vm
Some checks failed
Run integration tests for the cloud.google collection / integration (stable-2.16) (push) Has been cancelled
Run integration tests for the cloud.google collection / integration (stable-2.17) (push) Has been cancelled
Run integration tests for the cloud.google collection / integration (stable-2.18) (push) Has been cancelled
Some checks failed
Run integration tests for the cloud.google collection / integration (stable-2.16) (push) Has been cancelled
Run integration tests for the cloud.google collection / integration (stable-2.17) (push) Has been cancelled
Run integration tests for the cloud.google collection / integration (stable-2.18) (push) Has been cancelled
Add `discard_local_ssd` flag to compute instance
This commit is contained in:
commit
4d9aa19dc6
1 changed files with 11 additions and 1 deletions
|
@ -61,6 +61,13 @@ options:
|
|||
- Whether the resource should be protected against deletion.
|
||||
required: false
|
||||
type: bool
|
||||
discard_local_ssd:
|
||||
description:
|
||||
- Discards the contents of any attached Local SSD disks when changing status
|
||||
to TERMINATED.
|
||||
default: True
|
||||
required: false
|
||||
type: bool
|
||||
disks:
|
||||
description:
|
||||
- An array of disks that are associated with the instances that are created from
|
||||
|
@ -1112,6 +1119,7 @@ def main():
|
|||
state=dict(default='present', choices=['present', 'absent'], type='str'),
|
||||
can_ip_forward=dict(type='bool', aliases=['ip_forward']),
|
||||
deletion_protection=dict(type='bool'),
|
||||
discard_local_ssd=dict(type='bool', required=False, default=True),
|
||||
disks=dict(
|
||||
type='list',
|
||||
elements='dict',
|
||||
|
@ -1506,7 +1514,9 @@ class InstancePower(object):
|
|||
return "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/instances/{name}/start".format(**self.module.params)
|
||||
|
||||
def _stop_url(self):
|
||||
return "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/instances/{name}/stop".format(**self.module.params)
|
||||
return "https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/instances/{name}/stop?discardLocalSsd={discard_local_ssd}".format(
|
||||
**self.module.params
|
||||
)
|
||||
|
||||
|
||||
def deletion_protection_update(module, request, response):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue