diff --git a/plugins/modules/gcp_sql_instance.py b/plugins/modules/gcp_sql_instance.py index 9999dd1..c1325e9 100644 --- a/plugins/modules/gcp_sql_instance.py +++ b/plugins/modules/gcp_sql_instance.py @@ -250,6 +250,12 @@ options: required: false type: dict suboptions: + private_network: + description: + - Private network the instance need to be associated with. + Format: "projects/{{ project }}/global/networks/{{ network.name }}" + required: false + type: str ipv4_enabled: description: - Whether the instance should be assigned an IP address or not. @@ -869,6 +875,7 @@ def main(): ip_configuration=dict( type='dict', options=dict( + private_network=dict(type='str'), ipv4_enabled=dict(type='bool'), private_network=dict(type='str'), authorized_networks=dict( @@ -1261,6 +1268,7 @@ class InstanceIpconfiguration(object): def to_request(self): return remove_nones_from_dict( { + u'privateNetwork': self.request.get('private_network'), u'ipv4Enabled': self.request.get('ipv4_enabled'), u'privateNetwork': self.request.get('private_network'), u'authorizedNetworks': InstanceAuthorizednetworksArray(self.request.get('authorized_networks', []), self.module).to_request(), @@ -1271,6 +1279,7 @@ class InstanceIpconfiguration(object): def from_response(self): return remove_nones_from_dict( { + u'privateNetwork': self.request.get(u'privateNetwork'), u'ipv4Enabled': self.request.get(u'ipv4Enabled'), u'privateNetwork': self.request.get(u'privateNetwork'), u'authorizedNetworks': InstanceAuthorizednetworksArray(self.request.get(u'authorizedNetworks', []), self.module).from_response(),