Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Bicep resource definition
The automationAccounts/modules resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Automation/automationAccounts/modules resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.Automation/automationAccounts/modules@2024-10-23' = {
parent: resourceSymbolicName
location: 'string'
name: 'string'
properties: {
contentLink: {
contentHash: {
algorithm: 'string'
value: 'string'
}
uri: 'string'
version: 'string'
}
}
tags: {
{customized property}: 'string'
}
}
Property Values
Microsoft.Automation/automationAccounts/modules
| Name | Description | Value |
|---|---|---|
| location | Gets or sets the location of the resource. | string |
| name | The resource name | string (required) |
| parent | In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource. For more information, see Child resource outside parent resource. |
Symbolic name for resource of type: automationAccounts |
| properties | Gets or sets the module create properties. | ModuleCreateOrUpdatePropertiesOrModuleProperties (required) |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
ContentHash
| Name | Description | Value |
|---|---|---|
| algorithm | Gets or sets the content hash algorithm used to hash the content. | string (required) |
| value | Gets or sets expected hash value of the content. | string (required) |
ContentLink
| Name | Description | Value |
|---|---|---|
| contentHash | Gets or sets the hash. | ContentHash |
| uri | Gets or sets the uri of content. | string |
| version | Gets or sets the version of the content. | string |
ModuleCreateOrUpdateParametersTags
| Name | Description | Value |
|---|
ModuleCreateOrUpdatePropertiesOrModuleProperties
| Name | Description | Value |
|---|---|---|
| contentLink | Gets or sets the module content link. | ContentLink (required) |
Usage Examples
Bicep Samples
A basic example of deploying Automation Module.
param resourceName string = 'acctest0001'
param location string = 'westeurope'
resource automationAccount 'Microsoft.Automation/automationAccounts@2021-06-22' = {
name: resourceName
location: location
properties: {
encryption: {
keySource: 'Microsoft.Automation'
}
publicNetworkAccess: true
sku: {
name: 'Basic'
}
}
}
resource module 'Microsoft.Automation/automationAccounts/modules@2020-01-13-preview' = {
parent: automationAccount
name: 'xActiveDirectory'
properties: {
contentLink: {
uri: 'https://devopsgallerystorage.blob.core.windows.net/packages/xactivedirectory.2.19.0.nupkg'
}
}
}
Azure Quickstart Samples
The following Azure Quickstart templates contain Bicep samples for deploying this resource type.
| Bicep File | Description |
|---|---|
| ASR Runbooks | Deploys Automation Runbooks for ASR Recovery Plans |
ARM template resource definition
The automationAccounts/modules resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Automation/automationAccounts/modules resource, add the following JSON to your template.
{
"type": "Microsoft.Automation/automationAccounts/modules",
"apiVersion": "2024-10-23",
"name": "string",
"location": "string",
"properties": {
"contentLink": {
"contentHash": {
"algorithm": "string",
"value": "string"
},
"uri": "string",
"version": "string"
}
},
"tags": {
"{customized property}": "string"
}
}
Property Values
Microsoft.Automation/automationAccounts/modules
| Name | Description | Value |
|---|---|---|
| apiVersion | The api version | '2024-10-23' |
| location | Gets or sets the location of the resource. | string |
| name | The resource name | string (required) |
| properties | Gets or sets the module create properties. | ModuleCreateOrUpdatePropertiesOrModuleProperties (required) |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
| type | The resource type | 'Microsoft.Automation/automationAccounts/modules' |
ContentHash
| Name | Description | Value |
|---|---|---|
| algorithm | Gets or sets the content hash algorithm used to hash the content. | string (required) |
| value | Gets or sets expected hash value of the content. | string (required) |
ContentLink
| Name | Description | Value |
|---|---|---|
| contentHash | Gets or sets the hash. | ContentHash |
| uri | Gets or sets the uri of content. | string |
| version | Gets or sets the version of the content. | string |
ModuleCreateOrUpdateParametersTags
| Name | Description | Value |
|---|
ModuleCreateOrUpdatePropertiesOrModuleProperties
| Name | Description | Value |
|---|---|---|
| contentLink | Gets or sets the module content link. | ContentLink (required) |
Usage Examples
Azure Quickstart Templates
The following Azure Quickstart templates deploy this resource type.
| Template | Description |
|---|---|
| ASR Runbooks |
Deploys Automation Runbooks for ASR Recovery Plans |
| Azure Resource Optimization (ARO) Toolkit |
The Azure Resource Optimization Toolkit is a decentralized, native Azure solution using serverless technologies to optimize Azure resources on your subscription. Optimization happens automatically on your subscription once you enable or create your own schedule, including on new resources. This is an Azure Automation account with preconfigured runbooks and schedules you can utilize on your subscription to start saving money. |
Terraform (AzAPI provider) resource definition
The automationAccounts/modules resource type can be deployed with operations that target:
- Resource groups
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Automation/automationAccounts/modules resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Automation/automationAccounts/modules@2024-10-23"
name = "string"
parent_id = "string"
location = "string"
tags = {
{customized property} = "string"
}
body = {
properties = {
contentLink = {
contentHash = {
algorithm = "string"
value = "string"
}
uri = "string"
version = "string"
}
}
}
}
Property Values
Microsoft.Automation/automationAccounts/modules
| Name | Description | Value |
|---|---|---|
| location | Gets or sets the location of the resource. | string |
| name | The resource name | string (required) |
| parent_id | The ID of the resource that is the parent for this resource. | ID for resource of type: automationAccounts |
| properties | Gets or sets the module create properties. | ModuleCreateOrUpdatePropertiesOrModuleProperties (required) |
| tags | Resource tags | Dictionary of tag names and values. |
| type | The resource type | "Microsoft.Automation/automationAccounts/modules@2024-10-23" |
ContentHash
| Name | Description | Value |
|---|---|---|
| algorithm | Gets or sets the content hash algorithm used to hash the content. | string (required) |
| value | Gets or sets expected hash value of the content. | string (required) |
ContentLink
| Name | Description | Value |
|---|---|---|
| contentHash | Gets or sets the hash. | ContentHash |
| uri | Gets or sets the uri of content. | string |
| version | Gets or sets the version of the content. | string |
ModuleCreateOrUpdateParametersTags
| Name | Description | Value |
|---|
ModuleCreateOrUpdatePropertiesOrModuleProperties
| Name | Description | Value |
|---|---|---|
| contentLink | Gets or sets the module content link. | ContentLink (required) |
Usage Examples
Terraform Samples
A basic example of deploying Automation Module.
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}
provider "azapi" {
skip_provider_registration = false
}
variable "resource_name" {
type = string
default = "acctest0001"
}
variable "location" {
type = string
default = "westeurope"
}
resource "azapi_resource" "resourceGroup" {
type = "Microsoft.Resources/resourceGroups@2020-06-01"
name = var.resource_name
location = var.location
}
resource "azapi_resource" "automationAccount" {
type = "Microsoft.Automation/automationAccounts@2021-06-22"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = var.location
body = {
properties = {
encryption = {
keySource = "Microsoft.Automation"
}
publicNetworkAccess = true
sku = {
name = "Basic"
}
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
resource "azapi_resource" "module" {
type = "Microsoft.Automation/automationAccounts/modules@2020-01-13-preview"
parent_id = azapi_resource.automationAccount.id
name = "xActiveDirectory"
body = {
properties = {
contentLink = {
uri = "https://devopsgallerystorage.blob.core.windows.net/packages/xactivedirectory.2.19.0.nupkg"
}
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}