Skip to content

Commit

Permalink
Adding IP stack option (stack_type) to gcp_compute_instance
Browse files Browse the repository at this point in the history
Fixes #618
  • Loading branch information
safaci2000 committed Jul 17, 2024
1 parent a9c0624 commit 0403647
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions plugins/modules/gcp_compute_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -947,6 +947,11 @@
.
returned: success
type: dict
stack_type:
description:
- The IP stack type of the network, possible values: (IPV4_IPV6, IPV4_ONLY)
returned: success
type: str
networkIP:
description:
- An IPv4 internal network address to assign to the instance for this network
Expand Down Expand Up @@ -1164,6 +1169,7 @@ def main():
network=dict(type='dict'),
network_ip=dict(type='str'),
subnetwork=dict(type='dict'),
stack_type=dict(type='str'),
),
),
scheduling=dict(
Expand Down Expand Up @@ -1702,6 +1708,7 @@ def _request_for_item(self, item):
u'aliasIpRanges': InstanceAliasiprangesArray(item.get('alias_ip_ranges', []), self.module).to_request(),
u'network': replace_resource_dict(item.get(u'network', {}), 'selfLink'),
u'networkIP': item.get('network_ip'),
u'stackType': item.get('stack_type'),
u'subnetwork': replace_resource_dict(item.get(u'subnetwork', {}), 'selfLink'),
}
)
Expand All @@ -1713,6 +1720,7 @@ def _response_from_item(self, item):
u'aliasIpRanges': InstanceAliasiprangesArray(item.get(u'aliasIpRanges', []), self.module).from_response(),
u'network': item.get(u'network'),
u'networkIP': item.get(u'networkIP'),
u'stackType': item.get('stackType'),
u'subnetwork': item.get(u'subnetwork'),
}
)
Expand Down

0 comments on commit 0403647

Please sign in to comment.