diff --git a/changelogs/fragments/52389-mysqldatabase-fix-force-update.yaml b/changelogs/fragments/52389-mysqldatabase-fix-force-update.yaml new file mode 100644 index 0000000000..8fef766e69 --- /dev/null +++ b/changelogs/fragments/52389-mysqldatabase-fix-force-update.yaml @@ -0,0 +1,2 @@ +bugfixes: + - azure_rm_postgresqldatabase - fix force_update bug. \ No newline at end of file diff --git a/lib/ansible/modules/cloud/azure/azure_rm_mysqldatabase.py b/lib/ansible/modules/cloud/azure/azure_rm_mysqldatabase.py index 39a62ea213..8a74beedb0 100644 --- a/lib/ansible/modules/cloud/azure/azure_rm_mysqldatabase.py +++ b/lib/ansible/modules/cloud/azure/azure_rm_mysqldatabase.py @@ -146,6 +146,7 @@ class AzureRMDatabases(AzureRMModuleBase): self.resource_group = None self.server_name = None self.name = None + self.force_update = None self.parameters = dict() self.results = dict(changed=False) @@ -200,6 +201,7 @@ class AzureRMDatabases(AzureRMModuleBase): if not self.check_mode: self.delete_mysqldatabase() else: + self.fail("Database properties cannot be updated without setting 'force_update' option") self.to_do = Actions.NoAction if (self.to_do == Actions.Create) or (self.to_do == Actions.Update):