diff --git a/changelogs/fragments/azure_rm_deployment_fix_45941.yaml b/changelogs/fragments/azure_rm_deployment_fix_45941.yaml new file mode 100644 index 00000000000..bbfa8c78782 --- /dev/null +++ b/changelogs/fragments/azure_rm_deployment_fix_45941.yaml @@ -0,0 +1,2 @@ +bugfixes: +- azure_rm_deployment - fixed regression that prevents resource group from being created (https://github.com/ansible/ansible/issues/45941) diff --git a/lib/ansible/modules/cloud/azure/azure_rm_deployment.py b/lib/ansible/modules/cloud/azure/azure_rm_deployment.py index 43f09f0617f..c8e777c9d0e 100644 --- a/lib/ansible/modules/cloud/azure/azure_rm_deployment.py +++ b/lib/ansible/modules/cloud/azure/azure_rm_deployment.py @@ -491,7 +491,8 @@ class AzureRMDeploymentManager(AzureRMModuleBase): if self.append_tags and self.tags: try: - rg = self.get_resource_group(self.resource_group_name) + # fetch the RG directly (instead of using the base helper) since we don't want to exit if it's missing + rg = self.rm_client.resource_groups.get(self.resource_group_name) if rg.tags: self.tags = dict(self.tags, **rg.tags) except CloudError: