saltext.azurerm.utils.azurerm#

Azure Resource Manager Utilities

New in version 2019.2.0.

maintainer:

<devops@eitr.tech>

maturity:

new

depends:
platform:

linux

saltext.azurerm.utils.azurerm.get_client(client_type, **kwargs)[source]#

Dynamically load the selected client and return a management client object

saltext.azurerm.utils.azurerm.log_cloud_error(client, message, **kwargs)[source]#

Log an azurerm cloud error exception

saltext.azurerm.utils.azurerm.paged_object_to_list(paged_object)[source]#

Extract all pages within a paged object as a list of dictionaries

saltext.azurerm.utils.azurerm.create_object_model(module_name, object_name, **kwargs)[source]#

Assemble an object from incoming parameters.

saltext.azurerm.utils.azurerm.compare_list_of_dicts(old, new, convert_id_to_name=None)[source]#

Compare lists of dictionaries representing Azure objects. Only keys found in the “new” dictionaries are compared to the “old” dictionaries, since getting Azure objects from the API returns some read-only data which should not be used in the comparison. A list of parameter names can be passed in order to compare a bare object name to a full Azure ID path for brevity. If string types are found in values, comparison is case insensitive. Return comment should be used to trigger exit from the calling function.

saltext.azurerm.utils.azurerm.get_identity_credentials(**kwargs)[source]#

Acquire Azure RM Credentials from the identity provider (not for mgmt)

This is accessible on the hub so clients out in the code can use it. Non-management clients can’t be consolidated neatly here.

We basically set environment variables based upon incoming parameters and then pass off to the DefaultAzureCredential object to correctly parse those environment variables. See the Microsoft Docs on EnvironmentCredential for more information.