Skip to content

Commit

Permalink
Update Automation Account naming logic (#83)
Browse files Browse the repository at this point in the history
Following the update to Azure/Enterprise-Scale [PR#544](Azure/Enterprise-Scale#544), this update is intended to maintain consistency on the Automation Account deployed as part of the Management landing zone resources.
  • Loading branch information
Kevin Rowlandson authored May 4, 2021
1 parent e5d7b67 commit 98f329f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions modules/management/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ locals {
tags = var.tags
resource_prefix = coalesce(var.resource_prefix, local.root_id)
resource_suffix = length(var.resource_suffix) > 0 ? "-${var.resource_suffix}" : local.empty_string
resource_suffix_automation_account = length(local.root_id) + length(local.resource_suffix) < 3 ? "cc${local.resource_suffix}" : local.resource_suffix
existing_resource_group_name = var.existing_resource_group_name
existing_log_analytics_workspace_resource_id = var.existing_log_analytics_workspace_resource_id
existing_automation_account_resource_id = var.existing_automation_account_resource_id
Expand Down Expand Up @@ -151,7 +150,7 @@ locals {
"${local.resource_group_resource_id}/providers/Microsoft.Automation/automationAccounts/${local.azurerm_automation_account.name}"
)
azurerm_automation_account = {
name = try(local.custom_settings_aa.name, "${local.resource_prefix}-aa${local.resource_suffix_automation_account}")
name = try(local.custom_settings_aa.name, "${local.resource_prefix}-automation${local.resource_suffix}")
location = try(local.custom_settings_aa.location, local.location)
sku_name = try(local.custom_settings_aa.sku_name, "Basic")
tags = try(local.custom_settings_aa.tags, local.tags)
Expand Down

0 comments on commit 98f329f

Please sign in to comment.