-
Notifications
You must be signed in to change notification settings - Fork 332
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
Added force deletion capability to log analytics module and updated requirements.txt #273
Added force deletion capability to log analytics module and updated requirements.txt #273
Conversation
Hey @next-davidduquehernandez as a good startup point, it is important to open an issue explaining what do you want to achieve and then link the PR with the comment Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@next-davidduquehernandez I have added some comments to add a default value to the force option. Remember to open an issue with the description of what do you want to fix. Nice Job!
Fixes #274 |
Thank you for your comments @imjoseangel. I introduced some tests to this PR and fixed 'azure_rm_loganalyticsworkspace_info' too. I has created issue #274 and tried to link with this PR, but I don't know if it's already done. |
LGTM |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Sorry, This is my mistake! |
@next-davidduquehernandez Please add line "azure_rm_loganalyticsworkspace" to pr-pipelines.yml. Thank you very much! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, python3 in the pipeline lacks the filter json_query. Cancel it temporarily and change it back after updating the environment. Thank you!
that: | ||
- output.changed | ||
- output.retention_in_days == retention_days | ||
- output.intelligence_packs | json_query('[?name == `Backup`].enabled') | first == true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- output.intelligence_packs | json_query('[?name == `Backup`].enabled') | first == true | |
#- output.intelligence_packs | json_query('[?name == `Backup`].enabled') | first == true |
- output.changed | ||
- output.retention_in_days == retention_days | ||
- output.intelligence_packs | json_query('[?name == `Backup`].enabled') | first == true | ||
- output.intelligence_packs | json_query('[?name == `Containers`].enabled') | first == true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- output.intelligence_packs | json_query('[?name == `Containers`].enabled') | first == true | |
#- output.intelligence_packs | json_query('[?name == `Containers`].enabled') | first == true |
- facts.workspaces | length > 0 | ||
- facts.workspaces[0].retention_in_days == retention_days | ||
- facts.workspaces[0].intelligence_packs | length > 0 | ||
- facts.workspaces[0].intelligence_packs | json_query('[?name == `Backup`].enabled') | first == true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- facts.workspaces[0].intelligence_packs | json_query('[?name == `Backup`].enabled') | first == true | |
#- facts.workspaces[0].intelligence_packs | json_query('[?name == `Backup`].enabled') | first == true |
- facts.workspaces[0].retention_in_days == retention_days | ||
- facts.workspaces[0].intelligence_packs | length > 0 | ||
- facts.workspaces[0].intelligence_packs | json_query('[?name == `Backup`].enabled') | first == true | ||
- facts.workspaces[0].intelligence_packs | json_query('[?name == `Containers`].enabled') | first == true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- facts.workspaces[0].intelligence_packs | json_query('[?name == `Containers`].enabled') | first == true | |
#- facts.workspaces[0].intelligence_packs | json_query('[?name == `Containers`].enabled') | first == true |
…rement azure-mgmt-loganalytics to 1.0.0 and update sdk calls
…nalyticsworkspace_info.py
…json_query in test
Added "azure_rm_loganalyticsworkspace" to pr-pipelines.yml and commented lines with json_query. :) |
SUMMARY
Added force delete capability introduced on 05/26/2020 update. Updated requirement library 'azure-mgmt-loganalytics' to 1.0.0 and update its method calls.
ISSUE TYPE
COMPONENT NAME
azure_rm_loganalyticsworkspace
ADDITIONAL INFORMATION
According to azure documentation we can force log analytics deletion. This capability allow us to remove log analytics workspace permanently, cause default deletion has a soft-delete behavior.
As requirement was set to 0.2.0 (and this feature was introduced on 1.0.0), this forced me to update requirements and some sdk call methods.
This is my first pull request to an open source project. Please, tell me if I need to do some additional step or modify something in my code. Regards :)
Usage example:
Create log analytics workspace:
Create output:
Delete log analytics workspace with force:
Delete output: