Skip to content

Commit

Permalink
fix: ignore location for mg diagnnostics, fixes #1170
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-FFFFFF committed Nov 13, 2024
1 parent 4c29ae4 commit 08e6e40
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions resources.management_groups.tf
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ resource "azapi_resource" "diag_settings" {
type = "Microsoft.Insights/diagnosticSettings@2021-05-01-preview"
name = "toLA"
parent_id = each.key
location = "global"
schema_validation_enabled = false
body = {
properties = {
Expand All @@ -109,6 +110,11 @@ resource "azapi_resource" "diag_settings" {
azurerm_management_group.level_5,
azurerm_management_group.level_6,
]
lifecycle {
ignore_changes = [
location,
]
}
}

# This is used when strict_subscription_association is set to true
Expand Down

0 comments on commit 08e6e40

Please sign in to comment.