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
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 {
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 {
resource "azurerm_automation_module" "failover" {
name = "xFailOverCluster"
resource_group_name = var.rg_name
automation_account_name = data.azurerm_automation_account.dsc.name
module_link {
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
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"
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
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]
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"
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
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" {
Parameters
-
automation_account_name
required - string -
id
optional computed - string -
name
required - string -
resource_group_name
required - string -
module_link
list block -
timeouts
single block
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.