Browse Source

fix(contrib/terraform): do not add access_ip when not wanted (#9869)

pull/9915/head
Maxime Leroy 2 years ago
committed by GitHub
parent
commit
9a8bf0e38a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions
  1. 3
      contrib/terraform/terraform.py

3
contrib/terraform/terraform.py

@ -298,6 +298,9 @@ def openstack_host(resource, module_name):
if 'floating_ip' in raw_attrs:
attrs['private_ipv4'] = raw_attrs['network.0.fixed_ip_v4']
if 'metadata.use_access_ip' in raw_attrs and raw_attrs['metadata.use_access_ip'] == "0":
attrs.pop('access_ip')
try:
if 'metadata.prefer_ipv6' in raw_attrs and raw_attrs['metadata.prefer_ipv6'] == "1":
attrs.update({

Loading…
Cancel
Save