Skip to content

Commit

Permalink
Fix the authorized_ip_ranges parameter being None (#912)
Browse files Browse the repository at this point in the history
* Fix the authorized_ip_ranges parameter being None

* fix sanity fail
  • Loading branch information
Fred-sun authored Jul 20, 2022
1 parent 073f53a commit 11876c6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions plugins/modules/azure_rm_aks.py
Original file line number Diff line number Diff line change
Expand Up @@ -812,8 +812,9 @@ def is_property_changed(profile, property, ignore_case=False):
self.log(("Api Server Access Diff - Origin {0} / Update {1}"
.format(str(self.api_server_access_profile), str(response['api_server_access_profile']))))
self.fail("The enable_private_cluster of the api server access profile cannot be updated")
elif len(self.api_server_access_profile.get('authorized_ip_ranges')) != \
len(response['api_server_access_profile'].get('authorized_ip_ranges')):
elif self.api_server_access_profile.get('authorized_ip_ranges') is not None and \
len(self.api_server_access_profile.get('authorized_ip_ranges')) != \
len(response['api_server_access_profile'].get('authorized_ip_ranges', [])):
self.log(("Api Server Access Diff - Origin {0} / Update {1}"
.format(str(self.api_server_access_profile), str(response['api_server_access_profile']))))
to_be_updated = True
Expand Down

0 comments on commit 11876c6

Please sign in to comment.