Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding tags to the azure_rm_appgateway module. #1373

Merged
merged 5 commits into from
Feb 1, 2024
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion plugins/modules/azure_rm_appgateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -2239,6 +2239,8 @@ def exec_module(self, **kwargs):
self.parameters["web_application_firewall_configuration"] = kwargs[key]
elif key == "enable_http2":
self.parameters["enable_http2"] = kwargs[key]
elif key == "tags":
self.parameters["tags"] = kwargs[key]

response = None

Expand Down Expand Up @@ -2291,11 +2293,16 @@ def exec_module(self, **kwargs):
not compare_arrays(old_response, self.parameters, 'url_path_maps') or
not compare_arrays(old_response, self.parameters, 'trusted_root_certificates') or
not compare_dicts(old_response, self.parameters, 'autoscale_configuration') or
not compare_dicts(old_response, self.parameters, 'web_application_firewall_configuration')):
not compare_dicts(old_response, self.parameters, 'web_application_firewall_configuration'):
jmighion marked this conversation as resolved.
Show resolved Hide resolved
self.to_do = Actions.Update
else:
self.to_do = Actions.NoAction

update_tags, new_tags = self.update_tags(old_response['tags'])
jmighion marked this conversation as resolved.
Show resolved Hide resolved
if update_tags:
self.to_do = Actions.Update
self.parameters["tags"] = new_tags

if (self.to_do == Actions.Create) or (self.to_do == Actions.Update):
self.log("Need to Create / Update the Application Gateway instance")

Expand Down