This module creates an Automation Account that may be linked a Log Analytics Workspace for legacy Update Management solution.
Please note that the associated RunAs Account
is not created.
Module version | Terraform version | OpenTofu version | AzureRM version |
---|---|---|---|
>= 8.x.x | Unverified | 1.8.x | >= 4.0 |
>= 7.x.x | 1.3.x | >= 3.0 | |
>= 6.x.x | 1.x | >= 3.0 | |
>= 5.x.x | 0.15.x | >= 2.0 | |
>= 4.x.x | 0.13.x / 0.14.x | >= 2.0 | |
>= 3.x.x | 0.12.x | >= 2.0 | |
>= 2.x.x | 0.12.x | < 2.0 | |
< 2.x.x | 0.11.x | < 2.0 |
If you want to contribute to this repository, feel free to use our pre-commit git hook configuration which will help you automatically update and format some files for you by enforcing our Terraform code module best-practices.
More details are available in the CONTRIBUTING.md file.
This module is optimized to work with the Claranet terraform-wrapper tool
which set some terraform variables in the environment needed by this module.
More details about variables set by the terraform-wrapper
available in the documentation.
module "automation_account" {
source = "claranet/run/azurerm//modules/automation-account"
version = "x.x.x"
location = module.azure_region.location
location_short = module.azure_region.location_short
resource_group_name = module.rg.name
client_name = var.client_name
stack = var.stack
environment = var.environment
log_analytics_workspace_id = module.logs.id
logs_destinations_ids = [module.logs.id]
extra_tags = {
foo = "bar"
}
}
Name | Version |
---|---|
azurecaf | ~> 1.2, >= 1.2.22 |
azurerm | ~> 4.0 |
Name | Source | Version |
---|---|---|
diagnostics | claranet/diagnostic-settings/azurerm | ~> 8.0.0 |
Name | Type |
---|---|
azurerm_automation_account.main | resource |
azurerm_log_analytics_linked_service.main | resource |
azurecaf_name.automation_account | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
automation_account_extra_tags | Extra tags to add to automation account | map(string) |
{} |
no |
automation_account_identity_type | Automation Account identity type. Possible values include: null , SystemAssigned and UserAssigned . |
object({ |
{ |
no |
automation_account_sku | Automation account Sku | string |
"Basic" |
no |
client_name | Client name/account used in naming | string |
n/a | yes |
custom_name | Automation account custom name. | string |
"" |
no |
default_tags_enabled | Option to enable or disable default tags. | bool |
true |
no |
diagnostic_settings_custom_name | Custom name of the diagnostics settings, name will be default if not set. |
string |
"default" |
no |
environment | Project environment | string |
n/a | yes |
extra_tags | Extra tags to add | map(string) |
{} |
no |
location | Azure location. | string |
n/a | yes |
location_short | Short string for Azure location. | string |
n/a | yes |
log_analytics_resource_group_name | Log Analytics Workspace resource group name (if different from resource_group_name variable.) |
string |
null |
no |
log_analytics_workspace_id | Log Analytics Workspace ID that will be connected with the automation account | string |
"" |
no |
log_analytics_workspace_link_enabled | Enable Log Analytics Workspace that will be connected with the automation account | bool |
true |
no |
logs_categories | Log categories to send to destinations. | list(string) |
null |
no |
logs_destinations_ids | List of destination resources IDs for logs diagnostic destination. Can be Storage Account , Log Analytics Workspace and Event Hub . No more than one of each can be set.If you want to use Azure EventHub as a destination, you must provide a formatted string containing both the EventHub Namespace authorization send ID and the EventHub name (name of the queue to use in the Namespace) separated by the | character. |
list(string) |
n/a | yes |
logs_metrics_categories | Metrics categories to send to destinations. | list(string) |
null |
no |
name_prefix | Optional prefix for the generated name. | string |
"" |
no |
name_suffix | Optional suffix for the generated name. | string |
"" |
no |
resource_group_name | Resource group name | string |
n/a | yes |
stack | Project stack name | string |
n/a | yes |
Name | Description |
---|---|
dsc_primary_access_key | Azure Automation Account DSC primary access key. |
dsc_secondary_access_key | Azure Automation Account DSC secondary access key. |
dsc_server_endpoint | Azure Automation Account DSC server endpoint. |
id | Azure Automation Account ID. |
identity | Identity block with principal ID and tenant ID. |
module_diagnostics | Diagnostic settings module output. |
name | Azure Automation Account name. |
resource | Automation account resource object. |
resource_log_analytics_linked_service | Log Analytics linked service resource object. |