Skip to content

Commit 4295ab1

Browse files
authored
fix: update naming conventions for Power Platform NSGs in diagnostic settings
1 parent 2c4ec6d commit 4295ab1

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

infra/main.diagnostics.tf

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -245,13 +245,13 @@ resource "azapi_resource" "openai_diagnostics" {
245245
# Note: VNets and Private Endpoints do not support diagnostic settings.
246246
# NSGs support diagnostic settings for security events and rule counters.
247247

248-
# Enable diagnostic logging for primary NSG
249-
resource "azapi_resource" "primary_nsg_diagnostics" {
248+
# Enable diagnostic logging for Power Platform primary NSG
249+
resource "azapi_resource" "power_platform_primary_nsg_diagnostics" {
250250
count = var.include_log_analytics && !local.create_network_infrastructure ? 1 : 0
251251

252252
type = "Microsoft.Insights/diagnosticSettings@2021-05-01-preview"
253-
name = "primary-nsg-diagnostics"
254-
parent_id = azurerm_network_security_group.primary_nsg[0].id
253+
name = "power-platform-primary-nsg-diagnostics"
254+
parent_id = azurerm_network_security_group.power_platform_primary_nsg[0].id
255255

256256
body = {
257257
properties = {
@@ -270,13 +270,13 @@ resource "azapi_resource" "primary_nsg_diagnostics" {
270270
}
271271
}
272272

273-
# Enable diagnostic logging for failover NSG
274-
resource "azapi_resource" "failover_nsg_diagnostics" {
273+
# Enable diagnostic logging for Power Platform failover NSG
274+
resource "azapi_resource" "power_platform_failover_nsg_diagnostics" {
275275
count = var.include_log_analytics && !local.create_network_infrastructure ? 1 : 0
276276

277277
type = "Microsoft.Insights/diagnosticSettings@2021-05-01-preview"
278-
name = "failover-nsg-diagnostics"
279-
parent_id = azurerm_network_security_group.failover_nsg[0].id
278+
name = "power-platform-failover-nsg-diagnostics"
279+
parent_id = azurerm_network_security_group.power_platform_failover_nsg[0].id
280280

281281
body = {
282282
properties = {

infra/main.naming.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
locals {
77
# Organization suffixes and prefixes are optional, and we need to form an array of non-empty values only
8-
org_prefix = compact([var.org_naming.org_prefix])
9-
org_suffix = compact([var.org_naming.org_environment, var.org_naming.org_suffix])
8+
org_prefix = compact([var.org_naming.org_prefix])
9+
org_suffix = compact([var.org_naming.org_environment, var.org_naming.org_suffix])
1010
}
1111

1212
# Generate unique names for primary resources

0 commit comments

Comments
 (0)