Azure Automation Account
This page shows how to write Terraform and Azure Resource Manager for Automation Account and write them securely.
azurerm_automation_account (Terraform)
The Account in Automation can be configured in Terraform with the resource name azurerm_automation_account
. The following sections describe 10 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "azurerm_automation_account" "default" {
name = "automationAccount1"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
sku_name = "Basic"
resource "azurerm_automation_account" "azautomationaccount" {
name = var.azAutomationAccountName
location = var.location
resource_group_name = var.rg
sku_name = var.sku
resource "azurerm_automation_account" aa {
name = var.name
location = var.location
resource_group_name = var.resource_group_name
sku {
resource "azurerm_automation_account" "aa" {
name = var.res_aa_name
location = var.res_location
resource_group_name = var.res_rg_name
sku_name = var.res_aa_sku_name
tags = var.res_tags
resource "azurerm_automation_account" "example" {
name = var.autoaccount_name
resource_group_name = var.rg_name
location = var.rg_location
tags = var.rg_tags
sku_name = var.autoaccount_sku_name
resource "azurerm_automation_account" "automationaccount" {
name = var.automationaccount.name
location = var.location
resource_group_name = azurerm_resource_group.automationaccount.name
sku_name = "Basic"
resource "azurerm_automation_account" "this" {
name = var.name
resource_group_name = var.resource_group_name
location = var.location
sku_name = var.sku_name
resource "azurerm_automation_account" "automation_account" {
name = var.name
location = var.location
resource_group_name = var.resource_group_name
resource "azurerm_automation_account" "cmp" {
name = var.AutomationAccountName
location = azurerm_resource_group.cmp.location
resource_group_name = azurerm_resource_group.cmp.name
sku_name = "Basic"
resource "azurerm_automation_account" "default" {
name = "automationAccount1"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
sku_name = "Basic"
Parameters
-
dsc_primary_access_key
optional computed - string -
dsc_secondary_access_key
optional computed - string -
dsc_server_endpoint
optional computed - string -
id
optional computed - string -
location
required - string -
name
required - string -
resource_group_name
required - string -
sku_name
required - string -
tags
optional - map from string to string -
timeouts
single block
Explanation in Terraform Registry
Manages a Automation Account.
Microsoft.Automation/automationAccounts (Azure Resource Manager)
The automationAccounts in Microsoft.Automation can be configured in Azure Resource Manager with the resource name Microsoft.Automation/automationAccounts
. The following sections describe how to use the resource and its parameters.
Example Usage from GitHub
"type": "Microsoft.Automation/automationAccounts",
"apiVersion": "2015-10-31",
"name": "[parameters('automationAccounts_MHAutomation_name')]",
"location": "westeurope",
"properties": {}
},
"type": "Microsoft.Automation/automationAccounts",
"apiVersion": "2015-10-31",
"name": "[parameters('automationAccounts_MHRBook1_name')]",
"location": "westeurope",
"properties": {}
},
"type": "Microsoft.Automation/automationAccounts",
"apiVersion": "[variables('apiVersions').automation]",
"location": "[parameters('region')]",
"dependsOn": [],
"tags": {},
"properties": {
"type": "Microsoft.Automation/automationAccounts",
"apiVersion": "2015-10-31",
"name": "[parameters('hubAaName')]",
"location": "[parameters('location')]",
"properties": {
"sku": {
"type": "Microsoft.Automation/automationAccounts",
"apiVersion": "2015-01-01-preview",
"location": "[resourceGroup().location]",
"dependsOn": [],
"tags": {},
"properties": {
"type": "Microsoft.Automation/automationAccounts",
"apiVersion": "2020-01-13-preview",
"name": "[parameters('AutomationAccountName')]",
"location": "[parameters('location')]",
"properties": {
"sku": {
"type": "Microsoft.Automation/automationAccounts",
"apiVersion": "2015-10-31",
"name": "[parameters('automationAccounts_CleaningTools_name')]",
"location": "japaneast",
"properties": {
"sku": {
"type": "Microsoft.Automation/automationAccounts",
"apiVersion": "2015-01-01-preview",
"location": "[resourceGroup().location]",
"dependsOn": [ ],
"tags": { },
"properties": {
"type": "Microsoft.Automation/automationAccounts",
"apiVersion": "[variables('apiVersions').automation]",
"location": "[parameters('region')]",
"dependsOn": [],
"tags": {},
"properties": {
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"AutomationAccount": {
Parameters
apiVersion
required - stringidentity
optionaltype
optional - stringThe identity type.
userAssignedIdentities
optional - undefinedThe list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
location
optional - stringGets or sets the location of the resource.
name
required - stringThe name of the automation account.
properties
requireddisableLocalAuth
optional - booleanIndicates whether requests using non-AAD authentication are blocked
encryption
optionalidentity
optionaluserAssignedIdentity
optional - objectThe user identity used for CMK. It will be an ARM resource id in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
keySource
optional - stringEncryption Key Source.
keyVaultProperties
optionalkeyName
optional - stringThe name of key used to encrypt data.
keyvaultUri
optional - stringThe URI of the key vault key used to encrypt data.
keyVersion
optional - stringThe key version of the key used to encrypt data.
publicNetworkAccess
optional - booleanIndicates whether traffic on the non-ARM endpoint (Webhook/Agent) is allowed from the public internet
sku
optionalcapacity
optional - integerGets or sets the SKU capacity.
family
optional - stringGets or sets the SKU family.
name
required - stringGets or sets the SKU name of the account.
tags
optional - stringGets or sets the tags attached to the resource.
type
required - string
Frequently asked questions
What is Azure Automation Account?
Azure Automation Account is a resource for Automation of Microsoft Azure. Settings can be wrote in Terraform.
Where can I find the example code for the Azure Automation Account?
For Terraform, the gilyas/infracost, vkarki/nginxdemo and janegilring/Presentations source code examples are useful. See the Terraform Example section for further details.
For Azure Resource Manager, the MilanHochmann/GitARM, MilanHochmann/GitARM and heartland1976/SmallBusinessServerV2 source code examples are useful. See the Azure Resource Manager Example section for further details.