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

Commit

Permalink
Add settingsVersion property to Cloud SQL instance settings (#84)
Browse files Browse the repository at this point in the history
<!-- This change is generated by MagicModules. -->
/cc @slevenick
  • Loading branch information
modular-magician authored and rambleraptor committed Sep 21, 2018
1 parent 0c5df16 commit 6f80bb4
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions lib/ansible/modules/cloud/google/gcp_sql_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,12 @@
instances, this field determines whether the instance is Second Generation (recommended)
or First Generation.
required: false
settings_version:
description:
- The version of instance settings. This is a required field for update method to
make sure concurrent updates are handled properly. During update, use the most
recent settingsVersion value for this instance and do not try to update this value.
required: false
extends_documentation_fragment: gcp
'''

Expand Down Expand Up @@ -517,6 +523,13 @@
or First Generation.
returned: success
type: str
settings_version:
description:
- The version of instance settings. This is a required field for update method to
make sure concurrent updates are handled properly. During update, use the most
recent settingsVersion value for this instance and do not try to update this value.
returned: success
type: int
'''

################################################################################
Expand Down Expand Up @@ -578,7 +591,8 @@ def main():
)),
require_ssl=dict(type='bool')
)),
tier=dict(type='str')
tier=dict(type='str'),
settings_version=dict(type='int')
))
)
)
Expand Down Expand Up @@ -895,13 +909,15 @@ def __init__(self, request, module):
def to_request(self):
return remove_nones_from_dict({
u'ipConfiguration': InstanceIpConfiguration(self.request.get('ip_configuration', {}), self.module).to_request(),
u'tier': self.request.get('tier')
u'tier': self.request.get('tier'),
u'settingsVersion': self.request.get('settings_version')
})

def from_response(self):
return remove_nones_from_dict({
u'ipConfiguration': InstanceIpConfiguration(self.request.get(u'ipConfiguration', {}), self.module).from_response(),
u'tier': self.request.get(u'tier')
u'tier': self.request.get(u'tier'),
u'settingsVersion': self.request.get(u'settingsVersion')
})


Expand Down

0 comments on commit 6f80bb4

Please sign in to comment.