Azure Automation Module

This page shows how to write Terraform and Azure Resource Manager for Automation Module and write them securely.

azurerm_automation_module (Terraform)

The Module in Automation can be configured in Terraform with the resource name azurerm_automation_module. The following sections describe 10 examples of how to use the resource and its parameters.

Example Usage from GitHub

main.tf#L8
resource "azurerm_automation_module" "azaccount" {
  name                    = "Az.Accounts"
  resource_group_name     = data.azurerm_resource_group.autorg.name
  automation_account_name = data.azurerm_automation_account.autoacct.name

  module_link {
ReqModules.tf#L1
resource "azurerm_automation_module" "AzAccounts" {
  name                    = "Az.Accounts"
  resource_group_name     = azurerm_resource_group.RG.name
  automation_account_name = azurerm_automation_account.AR_Auto.name

  module_link {
dsc_config_sql.tf#L1
resource "azurerm_automation_module" "failover" {
  name                    = "xFailOverCluster"
  resource_group_name     = var.rg_name
  automation_account_name = data.azurerm_automation_account.dsc.name

  module_link {
dsc_config_shared.tf#L16
resource "azurerm_automation_module" "storage" {
  name                    = "xStorage"
  resource_group_name     = var.rg_name
  automation_account_name = "dscautomation"
  # automation_account_name = azurerm_automation_account.dsc.name

main.tf#L18
resource "azurerm_automation_module" "azaccountmodule" {
    name                    = "Az.Accounts"
    resource_group_name     = data.azurerm_resource_group.scaling-rg.name
    automation_account_name = azurerm_automation_account.scalingaccount.name
    module_link {
    uri = "https://www.powershellgallery.com/api/v2/package/Az.Accounts/1.9.2"
main.tf#L6
resource "azurerm_automation_module" "module_loop" {
  count                   = length(var.module_list)
  name                    = var.module_list[count.index]
  resource_group_name     = var.resource_group_name
  automation_account_name = var.automation_account_name

module.tf#L2
resource "azurerm_automation_module" "aa_module" {

  name                    = var.name
  resource_group_name     = var.resource_group_name
  automation_account_name = var.automation_account_name
  depends_on              = [var.automation_depends_on]
main.tf#L18
resource "azurerm_automation_module" "azaccountmodule" {
    name                    = "Az.Accounts"
    resource_group_name     = data.azurerm_resource_group.scaling-rg.name
    automation_account_name = azurerm_automation_account.scalingaccount.name
    module_link {
    uri = "https://www.powershellgallery.com/api/v2/package/Az.Accounts/1.9.2"
modules.tf#L3
resource "azurerm_automation_module" "StorageDSC" {
  #Source: https://github.com/dsccommunity/StorageDsc
  name                    = "StorageDSC"
  resource_group_name     = var.resource_group_name
  automation_account_name = var.automation_account_name

main.tf#L7
resource "azurerm_automation_module" "this" {
  automation_account_name = var.automation_account_name
  name                    = var.name
  resource_group_name     = var.resource_group_name

  dynamic "module_link" {

Review your Terraform file for Azure best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

Explanation in Terraform Registry

Manages a Automation Module.

Microsoft.Automation/automationAccounts/modules (Azure Resource Manager)

The automationAccounts/modules in Microsoft.Automation can be configured in Azure Resource Manager with the resource name Microsoft.Automation/automationAccounts/modules. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

An example could not be found in GitHub.

Frequently asked questions

What is Azure Automation Module?

Azure Automation Module 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 Module?

For Terraform, the paul-p-cb/azure_automation, ashutosh-rathore/AR_LAB1 and techbunny/hybrid-network-lab source code examples are useful. See the Terraform Example section for further details.