From 5c5421e453beafd3ffef93ace4a860a854d92085 Mon Sep 17 00:00:00 2001 From: "R. P. Taylor" <1686627+rptaylor@users.noreply.github.com> Date: Tue, 27 Aug 2024 08:28:57 -0700 Subject: [PATCH] fix double pop of access_ip (#11435) --- contrib/terraform/terraform.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/terraform/terraform.py b/contrib/terraform/terraform.py index f67b9d82d..f8487bf6b 100755 --- a/contrib/terraform/terraform.py +++ b/contrib/terraform/terraform.py @@ -368,7 +368,7 @@ def iter_host_ips(hosts, ips): 'ansible_host': ip, }) - if 'use_access_ip' in host[1]['metadata'] and host[1]['metadata']['use_access_ip'] == "0": + if 'use_access_ip' in host[1]['metadata'] and host[1]['metadata']['use_access_ip'] == "0" and 'access_ip' in host[1]: host[1].pop('access_ip') yield host