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

restorable_dropped_database_id isn't a valid parameter for the azure_rm_sqldatabase module, but it is in the Examples. #1640

Closed
joechancellor opened this issue Jul 18, 2024 · 3 comments
Labels
bug Something isn't working has_pr PR fixes have been made medium_priority Medium priority

Comments

@joechancellor
Copy link

joechancellor commented Jul 18, 2024

SUMMARY

This is in the examples of the python code and the online documentation for examples:

- name: Restore SQL Database
  azure_rm_sqldatabase:
    resource_group: myResourceGroup
    server_name: sqlcrudtest-5961
    name: restoreddb
    location: eastus
    create_mode: restore
    restorable_dropped_database_id: "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Sql/s
                                     ervers/testsvr/restorableDroppedDatabases/testdb2,131444841315030000"

restorable_dropped_database_id is not a valid module parameter

ISSUE TYPE
  • Documentation Report
COMPONENT NAME

azure_rm_sqldatabase

ANSIBLE VERSION
ansible [core 2.15.12]
  config file = /home/zee_root/lin_ansible/ansible.cfg
  configured module search path = ['/home/zee_root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/zee_root/.local/lib/python3.9/site-packages/ansible
  ansible collection location = /home/zee_root/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/zee_root/.local/bin/ansible
  python version = 3.9.5 (default, Nov 23 2021, 15:27:38) [GCC 9.3.0] (/usr/bin/python3.9)
  jinja version = 3.1.4
  libyaml = False
@Fred-sun Fred-sun added bug Something isn't working has_pr PR fixes have been made medium_priority Medium priority labels Jul 25, 2024
@Fred-sun
Copy link
Collaborator

@joechancellor Deleted in pr #1652

@joechancellor
Copy link
Author

Hi @Fred-sun , I just wanted to comment that the correct syntax for a restore is like this:

  azure_rm_sqldatabase:
    resource_group: myResourceGroup
    server_name: sqlcrudtest-5961
    name: restoreddb
    location: eastus 
    create_mode: restore
    source_database_id: '/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Sql/servers/testsvr/databases/testdb'
    source_database_deletion_date: '2024-07-26T17:50:01Z'

@Fred-sun
Copy link
Collaborator

@joechancellor Yes, you are right. When I(create_mode=restore), source_database_deletion_date must be configured. Also, restorable_dropped_database_id is a new property that I'll add in another PR. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working has_pr PR fixes have been made medium_priority Medium priority
Projects
None yet
Development

No branches or pull requests

2 participants