Skip to content

Commit 0403647

Browse files
committed
Adding IP stack option (stack_type) to gcp_compute_instance
Fixes #618
1 parent a9c0624 commit 0403647

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

plugins/modules/gcp_compute_instance.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -947,6 +947,11 @@
947947
.
948948
returned: success
949949
type: dict
950+
stack_type:
951+
description:
952+
- The IP stack type of the network, possible values: (IPV4_IPV6, IPV4_ONLY)
953+
returned: success
954+
type: str
950955
networkIP:
951956
description:
952957
- An IPv4 internal network address to assign to the instance for this network
@@ -1164,6 +1169,7 @@ def main():
11641169
network=dict(type='dict'),
11651170
network_ip=dict(type='str'),
11661171
subnetwork=dict(type='dict'),
1172+
stack_type=dict(type='str'),
11671173
),
11681174
),
11691175
scheduling=dict(
@@ -1702,6 +1708,7 @@ def _request_for_item(self, item):
17021708
u'aliasIpRanges': InstanceAliasiprangesArray(item.get('alias_ip_ranges', []), self.module).to_request(),
17031709
u'network': replace_resource_dict(item.get(u'network', {}), 'selfLink'),
17041710
u'networkIP': item.get('network_ip'),
1711+
u'stackType': item.get('stack_type'),
17051712
u'subnetwork': replace_resource_dict(item.get(u'subnetwork', {}), 'selfLink'),
17061713
}
17071714
)
@@ -1713,6 +1720,7 @@ def _response_from_item(self, item):
17131720
u'aliasIpRanges': InstanceAliasiprangesArray(item.get(u'aliasIpRanges', []), self.module).from_response(),
17141721
u'network': item.get(u'network'),
17151722
u'networkIP': item.get(u'networkIP'),
1723+
u'stackType': item.get('stackType'),
17161724
u'subnetwork': item.get(u'subnetwork'),
17171725
}
17181726
)

0 commit comments

Comments
 (0)