Azure (ARM) Resource State Module
New in version 2019.2.0.
| maintainer: | |
|---|---|
| maturity: |
new |
| depends: |
|
| platform: |
linux |
| configuration: |
This module requires Azure Resource Manager credentials to be passed as a dictionary of keyword arguments to the Required provider parameters:
Optional provider parameters:
Example Pillar for Azure Resource Manager authentication: azurearm:
user_pass_auth:
subscription_id: 3287abc8-f98a-c678-3bde-326766fd3617
username: fletch
password: 123pass
mysubscription:
subscription_id: 3287abc8-f98a-c678-3bde-326766fd3617
tenant: ABCDEFAB-1234-ABCD-1234-ABCDEFABCDEF
client_id: ABCDEFAB-1234-ABCD-1234-ABCDEFABCDEF
secret: XXXXXXXXXXXXXXXXXXXXXXXX
cloud_environment: AZURE_PUBLIC_CLOUD Example states using Azure Resource Manager authentication: {% set profile = salt['pillar.get']('azurearm:mysubscription') %}
Ensure resource group exists:
azurearm_resource.resource_group_present:
- name: my_rg
- location: westus
- tags:
how_awesome: very
contact_name: Elmer Fudd Gantry
- connection_auth: {{ profile }}
Ensure resource group is absent:
azurearm_resource.resource_group_absent:
- name: other_rg
- connection_auth: {{ profile }}
|
New in version 2019.2.0.
Ensure a policy assignment does not exist in the provided scope.
| Parameters: |
|
|---|
New in version 2019.2.0.
Ensure a security policy assignment exists.
| Parameters: |
|
|---|
Example usage:
Ensure policy assignment exists:
azurearm_resource.policy_assignment_present:
- name: testassign
- scope: /subscriptions/bc75htn-a0fhsi-349b-56gh-4fghti-f84852
- definition_name: testpolicy
- display_name: Test Assignment
- description: Test assignment for testing assignments.
- connection_auth: {{ profile }} New in version 2019.2.0.
Ensure a policy definition does not exist in the current subscription.
| Parameters: |
|
|---|
New in version 2019.2.0.
Ensure a security policy definition exists.
| Parameters: |
|
|---|
Example usage:
Ensure policy definition exists:
azurearm_resource.policy_definition_present:
- name: testpolicy
- display_name: Test Policy
- description: Test policy for testing policies.
- policy_rule:
if:
allOf:
- equals: Microsoft.Compute/virtualMachines/write
source: action
- field: location
in:
- eastus
- eastus2
- centralus
then:
effect: deny
- connection_auth: {{ profile }} New in version 2019.2.0.
Ensure a resource group does not exist in the current subscription.
| Parameters: |
|
|---|
New in version 2019.2.0.
Ensure a resource group exists.
| Parameters: |
|
|---|
Example usage:
Ensure resource group exists:
azurearm_resource.resource_group_present:
- name: group1
- location: eastus
- tags:
contact_name: Elmer Fudd Gantry
- connection_auth: {{ profile }}
© 2019 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltstack.com/en/latest/ref/states/all/salt.states.azurearm_resource.html