This commit is contained in:
chiranjeevirajukr 2025-02-07 05:35:17 +00:00 committed by GitHub
commit 57709e55fe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -250,6 +250,12 @@ options:
required: false required: false
type: dict type: dict
suboptions: 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: ipv4_enabled:
description: description:
- Whether the instance should be assigned an IP address or not. - Whether the instance should be assigned an IP address or not.
@ -869,6 +875,7 @@ def main():
ip_configuration=dict( ip_configuration=dict(
type='dict', type='dict',
options=dict( options=dict(
private_network=dict(type='str'),
ipv4_enabled=dict(type='bool'), ipv4_enabled=dict(type='bool'),
private_network=dict(type='str'), private_network=dict(type='str'),
authorized_networks=dict( authorized_networks=dict(
@ -1261,6 +1268,7 @@ class InstanceIpconfiguration(object):
def to_request(self): def to_request(self):
return remove_nones_from_dict( return remove_nones_from_dict(
{ {
u'privateNetwork': self.request.get('private_network'),
u'ipv4Enabled': self.request.get('ipv4_enabled'), u'ipv4Enabled': self.request.get('ipv4_enabled'),
u'privateNetwork': self.request.get('private_network'), u'privateNetwork': self.request.get('private_network'),
u'authorizedNetworks': InstanceAuthorizednetworksArray(self.request.get('authorized_networks', []), self.module).to_request(), u'authorizedNetworks': InstanceAuthorizednetworksArray(self.request.get('authorized_networks', []), self.module).to_request(),
@ -1271,6 +1279,7 @@ class InstanceIpconfiguration(object):
def from_response(self): def from_response(self):
return remove_nones_from_dict( return remove_nones_from_dict(
{ {
u'privateNetwork': self.request.get(u'privateNetwork'),
u'ipv4Enabled': self.request.get(u'ipv4Enabled'), u'ipv4Enabled': self.request.get(u'ipv4Enabled'),
u'privateNetwork': self.request.get(u'privateNetwork'), u'privateNetwork': self.request.get(u'privateNetwork'),
u'authorizedNetworks': InstanceAuthorizednetworksArray(self.request.get(u'authorizedNetworks', []), self.module).from_response(), u'authorizedNetworks': InstanceAuthorizednetworksArray(self.request.get(u'authorizedNetworks', []), self.module).from_response(),