From e6b9f4983c06d8364c739cd25144793e2dc1bb11 Mon Sep 17 00:00:00 2001 From: James Mighion Date: Wed, 31 Jan 2024 22:01:03 -0800 Subject: [PATCH] Adding tags to the azure_rm_appgateway module. (#1373) * Adding tags to the azure_rm_appgateway module. * Removing unnecessary tags from module_arg_spec. * Separate conditional for tag update. * Missing parenthesis. * Moving conditional under another. --- plugins/modules/azure_rm_appgateway.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/modules/azure_rm_appgateway.py b/plugins/modules/azure_rm_appgateway.py index f95766fa9..415a2a836 100644 --- a/plugins/modules/azure_rm_appgateway.py +++ b/plugins/modules/azure_rm_appgateway.py @@ -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 @@ -2296,6 +2298,11 @@ def exec_module(self, **kwargs): else: self.to_do = Actions.NoAction + update_tags, new_tags = self.update_tags(old_response['tags']) + 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")