-
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
Add new module azure_rm_afdrules to support Azure Frontdoor Standard and Premium #1604
base: dev
Are you sure you want to change the base?
Conversation
@jartoo self.actions and conditions, if not configured in the playbook, this parameter is None, so before comparing, please make sure that this value is not None, thank you! |
@jartoo plugins/module_utils/azure_rm_common_ext.py has a function 'default_compare' for comparison, For example, self.default_compare({}, new_parameters, old_parameters, '', dict(compare=[])), You can take a try! Thank you very much! |
Will take a look at this...thanks! |
Using idempotent_check() would work if the structures are identical. The problem with using that function in this case is that each Action and Condition type_name changes the variables that are used. I also do not force the user of the module to declare the type_name for each and hard code that in based on the name of the Action and Condition to simplify usage. Because the structures of the dict is therefore different, I am not sure I can use that function as the query from the Python SDK returns a structure that is actually a subset of all the possible parameters. But this did open my eyes to the AzureRMModuleBaseExt class and some of the options you have built in there. Please correct me if I am misunderstanding the use case applicability here. I will work on checking for None however, and resubmit with those changes shortly. Thanks! |
The structure is also slightly different, where I flattened the parameters section to reduce the hierarchy complexity... |
@jartoo You seem to have restored the changes of the dev branch, please check this PR again, thank you! |
SUMMARY
This module manages Frontdoor Rules for the Standard and Premium services. I propose building this as a separate module in lieu of complicating the azure_cdn_profile module so as to make the management of each of the elements easier. Azure Frontdoor is quite complex, so matching the modules with the Python SDK APIs seems to be the prudent design choice.
Continues to work on #1041 This does not complete this issue, yet.
ISSUE TYPE
COMPONENT NAME
Module: azure_rm_afdrules
ADDITIONAL INFORMATION
Provides the ability to manage Rules, per the Python SDK here: https://learn.microsoft.com/en-us/python/api/azure-mgmt-cdn/azure.mgmt.cdn.operations.rulesoperations?view=azure-python
Integration Tests: passed
Sanity Tests: passed