salt.cloud.clouds.azurearm

Azure Cloud Module

New in version 2016.11.0.

The Azure cloud module is used to control access to Microsoft Azure

depends:
configuration:

Required provider parameters:

if using username and password: * subscription_id * username * password

if using a service principal: * subscription_id * tenant * client_id * secret

Example /etc/salt/cloud.providers or /etc/salt/cloud.providers.d/azure.conf configuration:

my-azure-config with username and password:
  driver: azure
  subscription_id: 3287abc8-f98a-c678-3bde-326766fd3617
  username: larry
  password: 123pass

Or my-azure-config with service principal:
  driver: azure
  subscription_id: 3287abc8-f98a-c678-3bde-326766fd3617
  tenant: ABCDEFAB-1234-ABCD-1234-ABCDEFABCDEF
  client_id: ABCDEFAB-1234-ABCD-1234-ABCDEFABCDEF
  secret: XXXXXXXXXXXXXXXXXXXXXXXX

  The Service Principal can be created with the new Azure CLI (https://github.com/Azure/azure-cli) with:
  az ad sp create-for-rbac -n "http://<yourappname>" --role <role> --scopes <scope>
  For example, this creates a service principal with 'owner' role for the whole subscription:
  az ad sp create-for-rbac -n "http://mysaltapp" --role owner --scopes /subscriptions/3287abc8-f98a-c678-3bde-326766fd3617
  *Note: review the details of Service Principals. Owner role is more than you normally need, and you can restrict scope to a resource group or individual resources.
salt.cloud.clouds.azurearm.avail_images(conn=None, call=None)

List available images for Azure

salt.cloud.clouds.azurearm.avail_locations(conn=None, call=None)

List available locations for Azure

salt.cloud.clouds.azurearm.avail_sizes(call=None)

Return a list of sizes from Azure

salt.cloud.clouds.azurearm.create(vm_)

Create a single VM from a data dict

salt.cloud.clouds.azurearm.create_interface(call=None, kwargs=None)

Create a network interface

salt.cloud.clouds.azurearm.create_security_group(call=None, kwargs=None)

Create a security group

salt.cloud.clouds.azurearm.create_security_rule(call=None, kwargs=None)

Create a security rule (aka, firewall rule)

salt.cloud.clouds.azurearm.delete_blob(call=None, kwargs=None)

Delete a blob from a container

salt.cloud.clouds.azurearm.delete_interface(call=None, kwargs=None)

Create a network interface

salt.cloud.clouds.azurearm.delete_ip(call=None, kwargs=None)

Create a network interface

salt.cloud.clouds.azurearm.destroy(name, conn=None, call=None, kwargs=None)

Destroy a VM

CLI Examples:

salt-cloud -d myminion
salt-cloud -a destroy myminion service_name=myservice
salt.cloud.clouds.azurearm.get_configured_provider()

Return the first configured instance.

salt.cloud.clouds.azurearm.get_conn(Client=None)

Return a conn object for the passed VM data

salt.cloud.clouds.azurearm.get_dependencies()

Warn if dependencies aren't met.

salt.cloud.clouds.azurearm.get_location()

Return the location that is configured for this provider

salt.cloud.clouds.azurearm.list_blobs(call=None, kwargs=None)

List blobs

salt.cloud.clouds.azurearm.list_containers(call=None, kwargs=None)

List containers

salt.cloud.clouds.azurearm.list_interfaces(call=None, kwargs=None)

Create a network interface

salt.cloud.clouds.azurearm.list_ip_configurations(call=None, kwargs=None)

List IP configurations

salt.cloud.clouds.azurearm.list_networks(call=None, kwargs=None)

List virtual networks

salt.cloud.clouds.azurearm.list_nodes(conn=None, call=None)

List VMs on this Azure Active Provider

salt.cloud.clouds.azurearm.list_nodes_full(conn=None, call=None)

List VMs on this Azure account, with full information

salt.cloud.clouds.azurearm.list_nodes_select(conn=None, call=None)

Return a list of the VMs that are on the provider, with select fields

salt.cloud.clouds.azurearm.list_resource_groups(conn=None, call=None)

List resource groups associated with the account

salt.cloud.clouds.azurearm.list_security_groups(call=None, kwargs=None)

Create a network security_group

salt.cloud.clouds.azurearm.list_security_rules(call=None, kwargs=None)

Lits network security rules

salt.cloud.clouds.azurearm.list_storage_accounts(call=None, kwargs=None)

List storage accounts

salt.cloud.clouds.azurearm.list_storage_containers(call=None, kwargs=None)

List containers

salt.cloud.clouds.azurearm.list_subnets(call=None, kwargs=None)

List subnets in a virtual network

salt.cloud.clouds.azurearm.make_safe(data)

Turn object data into something serializable

salt.cloud.clouds.azurearm.pages_to_list(items)

Convert a set of links from a group of pages to a list

salt.cloud.clouds.azurearm.request_instance(call=None, kwargs=None)

Request that Azure spin up a new instance

salt.cloud.clouds.azurearm.show_instance(name, resource_group=None, call=None)

Show the details from the provider concerning an instance

salt.cloud.clouds.azurearm.show_interface(call=None, kwargs=None)

Create a network interface

salt.cloud.clouds.azurearm.show_security_group(call=None, kwargs=None)

Create a network security_group

salt.cloud.clouds.azurearm.show_security_rule(call=None, kwargs=None)

Create a network security_rule