From b6c67d77191f81be3306a029cb8d914b9b8c2cb4 Mon Sep 17 00:00:00 2001 From: Jonathan Moss Date: Thu, 9 Apr 2026 19:29:08 -0400 Subject: [PATCH 1/5] Add ARM throttling dashboards for FXCI subscriptions --- .../azure_fxci/arm-throttling-dashboard.tf | 11 ++ .../main.tf | 159 ++++++++++++++++++ .../outputs.tf | 4 + .../variables.tf | 40 +++++ .../arm-throttling-dashboard.tf | 11 ++ 5 files changed, 225 insertions(+) create mode 100644 terraform/azure_fxci/arm-throttling-dashboard.tf create mode 100644 terraform/azure_modules/arm_subscription_throttling_dashboard/main.tf create mode 100644 terraform/azure_modules/arm_subscription_throttling_dashboard/outputs.tf create mode 100644 terraform/azure_modules/arm_subscription_throttling_dashboard/variables.tf create mode 100644 terraform/azure_trusted_fxci/arm-throttling-dashboard.tf diff --git a/terraform/azure_fxci/arm-throttling-dashboard.tf b/terraform/azure_fxci/arm-throttling-dashboard.tf new file mode 100644 index 00000000..a670a02b --- /dev/null +++ b/terraform/azure_fxci/arm-throttling-dashboard.tf @@ -0,0 +1,11 @@ +module "arm_subscription_throttling_dashboard" { + source = "../azure_modules/arm_subscription_throttling_dashboard" + + resource_group_id = azurerm_resource_group.rg-central-us-runbooks.id + location = azurerm_resource_group.rg-central-us-runbooks.location + subscription_id = "108d46d5-fe9b-4850-9a7d-8c914aa6c1f0" + subscription_display_name = "FXCI Azure DevTest Subscription" + dashboard_name = "arm-throttle-fxci" + dashboard_display_name = "FXCI ARM Throttling" + tags = local.common_tags +} diff --git a/terraform/azure_modules/arm_subscription_throttling_dashboard/main.tf b/terraform/azure_modules/arm_subscription_throttling_dashboard/main.tf new file mode 100644 index 00000000..3d366566 --- /dev/null +++ b/terraform/azure_modules/arm_subscription_throttling_dashboard/main.tf @@ -0,0 +1,159 @@ +terraform { + required_providers { + azapi = { + source = "azure/azapi" + } + } +} + +locals { + subscription_resource_id = "/subscriptions/${var.subscription_id}" + + overview_markdown = <<-MARKDOWN + ## ${var.dashboard_display_name} + This dashboard is the shared entry point for Azure Resource Manager subscription throttling in ${var.subscription_display_name}. + + - Subscription resource: `${local.subscription_resource_id}` + - Start with the `Traffic` metric and add `StatusCode = 429`. + - High-signal filters for the current FXCI issue: `Namespace = MICROSOFT.RESOURCES`, `OperationType = write`. + - Click a chart to open Metrics explorer and split or filter by `RequestRegion`, `Namespace`, or `OperationType`. + MARKDOWN + + drilldown_markdown = <<-MARKDOWN + ### How to confirm subscription bucket pressure + 1. Re-run a failing `az` command with `--debug`. + 2. Capture the `429` response and inspect `x-ms-ratelimit-remaining-subscription-reads` or `x-ms-ratelimit-remaining-subscription-writes`. + 3. If those headers are near `0`, the general ARM subscription bucket is being exhausted. + + Docs: + - [Monitor Azure Resource Manager](https://learn.microsoft.com/azure/azure-resource-manager/management/monitor-resource-manager) + - [Understand how Azure Resource Manager throttles requests](https://learn.microsoft.com/azure/azure-resource-manager/management/request-limits-and-throttling) + MARKDOWN +} + +resource "azapi_resource" "this" { + type = "Microsoft.Portal/dashboards@2020-09-01-preview" + name = var.dashboard_name + parent_id = var.resource_group_id + location = var.location + schema_validation_enabled = false + + tags = merge( + var.tags, + { + Name = var.dashboard_name + "hidden-title" = var.dashboard_display_name + } + ) + + body = { + properties = { + lenses = [ + { + order = 0 + parts = [ + { + position = { + x = 0 + y = 0 + rowSpan = 3 + colSpan = 11 + } + metadata = { + inputs = [] + type = "Extension/HubsExtension/PartType/MarkdownPart" + settings = { + content = { + settings = { + content = local.overview_markdown + title = var.dashboard_display_name + subtitle = "Azure Resource Manager subscription throttling" + } + } + } + } + }, + { + position = { + x = 0 + y = 3 + rowSpan = 4 + colSpan = 6 + } + metadata = { + inputs = [ + { + name = "queryInputs" + value = { + timespan = { + duration = var.metric_timespan + } + id = local.subscription_resource_id + chartType = 0 + metrics = [ + { + name = "Traffic" + resourceId = local.subscription_resource_id + } + ] + } + } + ] + type = "Extension/Microsoft_Azure_Monitoring/PartType/MetricsChartPart" + } + }, + { + position = { + x = 6 + y = 3 + rowSpan = 4 + colSpan = 5 + } + metadata = { + inputs = [ + { + name = "queryInputs" + value = { + timespan = { + duration = var.metric_timespan + } + id = local.subscription_resource_id + chartType = 0 + metrics = [ + { + name = "Latency" + resourceId = local.subscription_resource_id + } + ] + } + } + ] + type = "Extension/Microsoft_Azure_Monitoring/PartType/MetricsChartPart" + } + }, + { + position = { + x = 0 + y = 7 + rowSpan = 5 + colSpan = 11 + } + metadata = { + inputs = [] + type = "Extension/HubsExtension/PartType/MarkdownPart" + settings = { + content = { + settings = { + content = local.drilldown_markdown + title = "Operational notes" + } + } + } + } + } + ] + } + ] + } + } +} diff --git a/terraform/azure_modules/arm_subscription_throttling_dashboard/outputs.tf b/terraform/azure_modules/arm_subscription_throttling_dashboard/outputs.tf new file mode 100644 index 00000000..972ac0c5 --- /dev/null +++ b/terraform/azure_modules/arm_subscription_throttling_dashboard/outputs.tf @@ -0,0 +1,4 @@ +output "dashboard_id" { + description = "Resource ID for the Azure Portal dashboard." + value = azapi_resource.this.id +} diff --git a/terraform/azure_modules/arm_subscription_throttling_dashboard/variables.tf b/terraform/azure_modules/arm_subscription_throttling_dashboard/variables.tf new file mode 100644 index 00000000..d86f4682 --- /dev/null +++ b/terraform/azure_modules/arm_subscription_throttling_dashboard/variables.tf @@ -0,0 +1,40 @@ +variable "dashboard_display_name" { + description = "Portal display name for the dashboard." + type = string +} + +variable "dashboard_name" { + description = "Azure resource name for the dashboard." + type = string +} + +variable "location" { + description = "Azure region where the dashboard resource will live." + type = string +} + +variable "metric_timespan" { + description = "Default timespan for dashboard metrics." + type = string + default = "P7D" +} + +variable "resource_group_id" { + description = "Resource group resource ID used as the dashboard parent." + type = string +} + +variable "subscription_display_name" { + description = "Human-readable subscription name shown in dashboard markdown." + type = string +} + +variable "subscription_id" { + description = "Subscription GUID for the monitored Azure subscription." + type = string +} + +variable "tags" { + description = "Tags applied to the dashboard resource." + type = map(string) +} diff --git a/terraform/azure_trusted_fxci/arm-throttling-dashboard.tf b/terraform/azure_trusted_fxci/arm-throttling-dashboard.tf new file mode 100644 index 00000000..e0c5bddb --- /dev/null +++ b/terraform/azure_trusted_fxci/arm-throttling-dashboard.tf @@ -0,0 +1,11 @@ +module "arm_subscription_throttling_dashboard" { + source = "../azure_modules/arm_subscription_throttling_dashboard" + + resource_group_id = azurerm_resource_group.rg-central-us-trusted-runbooks.id + location = azurerm_resource_group.rg-central-us-trusted-runbooks.location + subscription_id = "a30e97ab-734a-4f3b-a0e4-c51c0bff0701" + subscription_display_name = "Trusted FXCI Azure DevTest Subscription" + dashboard_name = "arm-throttle-tfxci" + dashboard_display_name = "Trusted FXCI ARM Throttling" + tags = local.common_tags +} From a38c1729a8a0a72e02df0c227e96a13677aa9e86 Mon Sep 17 00:00:00 2001 From: Jonathan Moss Date: Thu, 9 Apr 2026 19:32:08 -0400 Subject: [PATCH 2/5] Inline FXCI ARM throttling dashboards --- .../azure_fxci/arm-throttling-dashboard.tf | 156 ++++++++++++++++- .../main.tf | 159 ------------------ .../outputs.tf | 4 - .../variables.tf | 40 ----- .../arm-throttling-dashboard.tf | 156 ++++++++++++++++- 5 files changed, 296 insertions(+), 219 deletions(-) delete mode 100644 terraform/azure_modules/arm_subscription_throttling_dashboard/main.tf delete mode 100644 terraform/azure_modules/arm_subscription_throttling_dashboard/outputs.tf delete mode 100644 terraform/azure_modules/arm_subscription_throttling_dashboard/variables.tf diff --git a/terraform/azure_fxci/arm-throttling-dashboard.tf b/terraform/azure_fxci/arm-throttling-dashboard.tf index a670a02b..bfbbdebf 100644 --- a/terraform/azure_fxci/arm-throttling-dashboard.tf +++ b/terraform/azure_fxci/arm-throttling-dashboard.tf @@ -1,11 +1,151 @@ -module "arm_subscription_throttling_dashboard" { - source = "../azure_modules/arm_subscription_throttling_dashboard" +locals { + fxci_arm_throttling_dashboard_subscription_resource_id = "/subscriptions/108d46d5-fe9b-4850-9a7d-8c914aa6c1f0" - resource_group_id = azurerm_resource_group.rg-central-us-runbooks.id + fxci_arm_throttling_dashboard_overview_markdown = <<-MARKDOWN + ## FXCI ARM Throttling + This dashboard is the shared entry point for Azure Resource Manager subscription throttling in FXCI Azure DevTest Subscription. + + - Subscription resource: `${local.fxci_arm_throttling_dashboard_subscription_resource_id}` + - Start with the `Traffic` metric and add `StatusCode = 429`. + - High-signal filters for the current FXCI issue: `Namespace = MICROSOFT.RESOURCES`, `OperationType = write`. + - Click a chart to open Metrics explorer and split or filter by `RequestRegion`, `Namespace`, or `OperationType`. + MARKDOWN + + fxci_arm_throttling_dashboard_drilldown_markdown = <<-MARKDOWN + ### How to confirm subscription bucket pressure + 1. Re-run a failing `az` command with `--debug`. + 2. Capture the `429` response and inspect `x-ms-ratelimit-remaining-subscription-reads` or `x-ms-ratelimit-remaining-subscription-writes`. + 3. If those headers are near `0`, the general ARM subscription bucket is being exhausted. + + Docs: + - [Monitor Azure Resource Manager](https://learn.microsoft.com/azure/azure-resource-manager/management/monitor-resource-manager) + - [Understand how Azure Resource Manager throttles requests](https://learn.microsoft.com/azure/azure-resource-manager/management/request-limits-and-throttling) + MARKDOWN +} + +resource "azapi_resource" "fxci_arm_throttling_dashboard" { + type = "Microsoft.Portal/dashboards@2020-09-01-preview" + name = "arm-throttle-fxci" + parent_id = azurerm_resource_group.rg-central-us-runbooks.id location = azurerm_resource_group.rg-central-us-runbooks.location - subscription_id = "108d46d5-fe9b-4850-9a7d-8c914aa6c1f0" - subscription_display_name = "FXCI Azure DevTest Subscription" - dashboard_name = "arm-throttle-fxci" - dashboard_display_name = "FXCI ARM Throttling" - tags = local.common_tags + schema_validation_enabled = false + + tags = merge( + local.common_tags, + { + Name = "arm-throttle-fxci" + "hidden-title" = "FXCI ARM Throttling" + } + ) + + body = { + properties = { + lenses = [ + { + order = 0 + parts = [ + { + position = { + x = 0 + y = 0 + rowSpan = 3 + colSpan = 11 + } + metadata = { + inputs = [] + type = "Extension/HubsExtension/PartType/MarkdownPart" + settings = { + content = { + settings = { + content = local.fxci_arm_throttling_dashboard_overview_markdown + title = "FXCI ARM Throttling" + subtitle = "Azure Resource Manager subscription throttling" + } + } + } + } + }, + { + position = { + x = 0 + y = 3 + rowSpan = 4 + colSpan = 6 + } + metadata = { + inputs = [ + { + name = "queryInputs" + value = { + timespan = { + duration = "P7D" + } + id = local.fxci_arm_throttling_dashboard_subscription_resource_id + chartType = 0 + metrics = [ + { + name = "Traffic" + resourceId = local.fxci_arm_throttling_dashboard_subscription_resource_id + } + ] + } + } + ] + type = "Extension/Microsoft_Azure_Monitoring/PartType/MetricsChartPart" + } + }, + { + position = { + x = 6 + y = 3 + rowSpan = 4 + colSpan = 5 + } + metadata = { + inputs = [ + { + name = "queryInputs" + value = { + timespan = { + duration = "P7D" + } + id = local.fxci_arm_throttling_dashboard_subscription_resource_id + chartType = 0 + metrics = [ + { + name = "Latency" + resourceId = local.fxci_arm_throttling_dashboard_subscription_resource_id + } + ] + } + } + ] + type = "Extension/Microsoft_Azure_Monitoring/PartType/MetricsChartPart" + } + }, + { + position = { + x = 0 + y = 7 + rowSpan = 5 + colSpan = 11 + } + metadata = { + inputs = [] + type = "Extension/HubsExtension/PartType/MarkdownPart" + settings = { + content = { + settings = { + content = local.fxci_arm_throttling_dashboard_drilldown_markdown + title = "Operational notes" + } + } + } + } + } + ] + } + ] + } + } } diff --git a/terraform/azure_modules/arm_subscription_throttling_dashboard/main.tf b/terraform/azure_modules/arm_subscription_throttling_dashboard/main.tf deleted file mode 100644 index 3d366566..00000000 --- a/terraform/azure_modules/arm_subscription_throttling_dashboard/main.tf +++ /dev/null @@ -1,159 +0,0 @@ -terraform { - required_providers { - azapi = { - source = "azure/azapi" - } - } -} - -locals { - subscription_resource_id = "/subscriptions/${var.subscription_id}" - - overview_markdown = <<-MARKDOWN - ## ${var.dashboard_display_name} - This dashboard is the shared entry point for Azure Resource Manager subscription throttling in ${var.subscription_display_name}. - - - Subscription resource: `${local.subscription_resource_id}` - - Start with the `Traffic` metric and add `StatusCode = 429`. - - High-signal filters for the current FXCI issue: `Namespace = MICROSOFT.RESOURCES`, `OperationType = write`. - - Click a chart to open Metrics explorer and split or filter by `RequestRegion`, `Namespace`, or `OperationType`. - MARKDOWN - - drilldown_markdown = <<-MARKDOWN - ### How to confirm subscription bucket pressure - 1. Re-run a failing `az` command with `--debug`. - 2. Capture the `429` response and inspect `x-ms-ratelimit-remaining-subscription-reads` or `x-ms-ratelimit-remaining-subscription-writes`. - 3. If those headers are near `0`, the general ARM subscription bucket is being exhausted. - - Docs: - - [Monitor Azure Resource Manager](https://learn.microsoft.com/azure/azure-resource-manager/management/monitor-resource-manager) - - [Understand how Azure Resource Manager throttles requests](https://learn.microsoft.com/azure/azure-resource-manager/management/request-limits-and-throttling) - MARKDOWN -} - -resource "azapi_resource" "this" { - type = "Microsoft.Portal/dashboards@2020-09-01-preview" - name = var.dashboard_name - parent_id = var.resource_group_id - location = var.location - schema_validation_enabled = false - - tags = merge( - var.tags, - { - Name = var.dashboard_name - "hidden-title" = var.dashboard_display_name - } - ) - - body = { - properties = { - lenses = [ - { - order = 0 - parts = [ - { - position = { - x = 0 - y = 0 - rowSpan = 3 - colSpan = 11 - } - metadata = { - inputs = [] - type = "Extension/HubsExtension/PartType/MarkdownPart" - settings = { - content = { - settings = { - content = local.overview_markdown - title = var.dashboard_display_name - subtitle = "Azure Resource Manager subscription throttling" - } - } - } - } - }, - { - position = { - x = 0 - y = 3 - rowSpan = 4 - colSpan = 6 - } - metadata = { - inputs = [ - { - name = "queryInputs" - value = { - timespan = { - duration = var.metric_timespan - } - id = local.subscription_resource_id - chartType = 0 - metrics = [ - { - name = "Traffic" - resourceId = local.subscription_resource_id - } - ] - } - } - ] - type = "Extension/Microsoft_Azure_Monitoring/PartType/MetricsChartPart" - } - }, - { - position = { - x = 6 - y = 3 - rowSpan = 4 - colSpan = 5 - } - metadata = { - inputs = [ - { - name = "queryInputs" - value = { - timespan = { - duration = var.metric_timespan - } - id = local.subscription_resource_id - chartType = 0 - metrics = [ - { - name = "Latency" - resourceId = local.subscription_resource_id - } - ] - } - } - ] - type = "Extension/Microsoft_Azure_Monitoring/PartType/MetricsChartPart" - } - }, - { - position = { - x = 0 - y = 7 - rowSpan = 5 - colSpan = 11 - } - metadata = { - inputs = [] - type = "Extension/HubsExtension/PartType/MarkdownPart" - settings = { - content = { - settings = { - content = local.drilldown_markdown - title = "Operational notes" - } - } - } - } - } - ] - } - ] - } - } -} diff --git a/terraform/azure_modules/arm_subscription_throttling_dashboard/outputs.tf b/terraform/azure_modules/arm_subscription_throttling_dashboard/outputs.tf deleted file mode 100644 index 972ac0c5..00000000 --- a/terraform/azure_modules/arm_subscription_throttling_dashboard/outputs.tf +++ /dev/null @@ -1,4 +0,0 @@ -output "dashboard_id" { - description = "Resource ID for the Azure Portal dashboard." - value = azapi_resource.this.id -} diff --git a/terraform/azure_modules/arm_subscription_throttling_dashboard/variables.tf b/terraform/azure_modules/arm_subscription_throttling_dashboard/variables.tf deleted file mode 100644 index d86f4682..00000000 --- a/terraform/azure_modules/arm_subscription_throttling_dashboard/variables.tf +++ /dev/null @@ -1,40 +0,0 @@ -variable "dashboard_display_name" { - description = "Portal display name for the dashboard." - type = string -} - -variable "dashboard_name" { - description = "Azure resource name for the dashboard." - type = string -} - -variable "location" { - description = "Azure region where the dashboard resource will live." - type = string -} - -variable "metric_timespan" { - description = "Default timespan for dashboard metrics." - type = string - default = "P7D" -} - -variable "resource_group_id" { - description = "Resource group resource ID used as the dashboard parent." - type = string -} - -variable "subscription_display_name" { - description = "Human-readable subscription name shown in dashboard markdown." - type = string -} - -variable "subscription_id" { - description = "Subscription GUID for the monitored Azure subscription." - type = string -} - -variable "tags" { - description = "Tags applied to the dashboard resource." - type = map(string) -} diff --git a/terraform/azure_trusted_fxci/arm-throttling-dashboard.tf b/terraform/azure_trusted_fxci/arm-throttling-dashboard.tf index e0c5bddb..3ae9603c 100644 --- a/terraform/azure_trusted_fxci/arm-throttling-dashboard.tf +++ b/terraform/azure_trusted_fxci/arm-throttling-dashboard.tf @@ -1,11 +1,151 @@ -module "arm_subscription_throttling_dashboard" { - source = "../azure_modules/arm_subscription_throttling_dashboard" +locals { + trusted_fxci_arm_throttling_dashboard_subscription_resource_id = "/subscriptions/a30e97ab-734a-4f3b-a0e4-c51c0bff0701" - resource_group_id = azurerm_resource_group.rg-central-us-trusted-runbooks.id + trusted_fxci_arm_throttling_dashboard_overview_markdown = <<-MARKDOWN + ## Trusted FXCI ARM Throttling + This dashboard is the shared entry point for Azure Resource Manager subscription throttling in Trusted FXCI Azure DevTest Subscription. + + - Subscription resource: `${local.trusted_fxci_arm_throttling_dashboard_subscription_resource_id}` + - Start with the `Traffic` metric and add `StatusCode = 429`. + - High-signal filters for the current FXCI issue: `Namespace = MICROSOFT.RESOURCES`, `OperationType = write`. + - Click a chart to open Metrics explorer and split or filter by `RequestRegion`, `Namespace`, or `OperationType`. + MARKDOWN + + trusted_fxci_arm_throttling_dashboard_drilldown_markdown = <<-MARKDOWN + ### How to confirm subscription bucket pressure + 1. Re-run a failing `az` command with `--debug`. + 2. Capture the `429` response and inspect `x-ms-ratelimit-remaining-subscription-reads` or `x-ms-ratelimit-remaining-subscription-writes`. + 3. If those headers are near `0`, the general ARM subscription bucket is being exhausted. + + Docs: + - [Monitor Azure Resource Manager](https://learn.microsoft.com/azure/azure-resource-manager/management/monitor-resource-manager) + - [Understand how Azure Resource Manager throttles requests](https://learn.microsoft.com/azure/azure-resource-manager/management/request-limits-and-throttling) + MARKDOWN +} + +resource "azapi_resource" "trusted_fxci_arm_throttling_dashboard" { + type = "Microsoft.Portal/dashboards@2020-09-01-preview" + name = "arm-throttle-tfxci" + parent_id = azurerm_resource_group.rg-central-us-trusted-runbooks.id location = azurerm_resource_group.rg-central-us-trusted-runbooks.location - subscription_id = "a30e97ab-734a-4f3b-a0e4-c51c0bff0701" - subscription_display_name = "Trusted FXCI Azure DevTest Subscription" - dashboard_name = "arm-throttle-tfxci" - dashboard_display_name = "Trusted FXCI ARM Throttling" - tags = local.common_tags + schema_validation_enabled = false + + tags = merge( + local.common_tags, + { + Name = "arm-throttle-tfxci" + "hidden-title" = "Trusted FXCI ARM Throttling" + } + ) + + body = { + properties = { + lenses = [ + { + order = 0 + parts = [ + { + position = { + x = 0 + y = 0 + rowSpan = 3 + colSpan = 11 + } + metadata = { + inputs = [] + type = "Extension/HubsExtension/PartType/MarkdownPart" + settings = { + content = { + settings = { + content = local.trusted_fxci_arm_throttling_dashboard_overview_markdown + title = "Trusted FXCI ARM Throttling" + subtitle = "Azure Resource Manager subscription throttling" + } + } + } + } + }, + { + position = { + x = 0 + y = 3 + rowSpan = 4 + colSpan = 6 + } + metadata = { + inputs = [ + { + name = "queryInputs" + value = { + timespan = { + duration = "P7D" + } + id = local.trusted_fxci_arm_throttling_dashboard_subscription_resource_id + chartType = 0 + metrics = [ + { + name = "Traffic" + resourceId = local.trusted_fxci_arm_throttling_dashboard_subscription_resource_id + } + ] + } + } + ] + type = "Extension/Microsoft_Azure_Monitoring/PartType/MetricsChartPart" + } + }, + { + position = { + x = 6 + y = 3 + rowSpan = 4 + colSpan = 5 + } + metadata = { + inputs = [ + { + name = "queryInputs" + value = { + timespan = { + duration = "P7D" + } + id = local.trusted_fxci_arm_throttling_dashboard_subscription_resource_id + chartType = 0 + metrics = [ + { + name = "Latency" + resourceId = local.trusted_fxci_arm_throttling_dashboard_subscription_resource_id + } + ] + } + } + ] + type = "Extension/Microsoft_Azure_Monitoring/PartType/MetricsChartPart" + } + }, + { + position = { + x = 0 + y = 7 + rowSpan = 5 + colSpan = 11 + } + metadata = { + inputs = [] + type = "Extension/HubsExtension/PartType/MarkdownPart" + settings = { + content = { + settings = { + content = local.trusted_fxci_arm_throttling_dashboard_drilldown_markdown + title = "Operational notes" + } + } + } + } + } + ] + } + ] + } + } } From 019b874bfc4bd5da562ff9f07f8b1cfd9503e56b Mon Sep 17 00:00:00 2001 From: Jonathan Moss Date: Fri, 10 Apr 2026 14:29:47 -0400 Subject: [PATCH 3/5] Bump dashboard API to 2025-04-01-preview No schema changes between 2020-09-01-preview and 2025-04-01-preview per Microsoft change log. --- terraform/azure_fxci/arm-throttling-dashboard.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/azure_fxci/arm-throttling-dashboard.tf b/terraform/azure_fxci/arm-throttling-dashboard.tf index bfbbdebf..17f77ae4 100644 --- a/terraform/azure_fxci/arm-throttling-dashboard.tf +++ b/terraform/azure_fxci/arm-throttling-dashboard.tf @@ -24,7 +24,7 @@ locals { } resource "azapi_resource" "fxci_arm_throttling_dashboard" { - type = "Microsoft.Portal/dashboards@2020-09-01-preview" + type = "Microsoft.Portal/dashboards@2025-04-01-preview" name = "arm-throttle-fxci" parent_id = azurerm_resource_group.rg-central-us-runbooks.id location = azurerm_resource_group.rg-central-us-runbooks.location From 58a4fb2595c46da6704003b48612d53eb8011e24 Mon Sep 17 00:00:00 2001 From: Jonathan Moss Date: Fri, 10 Apr 2026 14:38:37 -0400 Subject: [PATCH 4/5] Fix metric chart tiles by switching to MonitorChartPart The older MetricsChartPart format lacked the namespace field, causing "isMdmMetricEnabled" errors for subscription-level ARM metrics. Use MonitorChartPart with resourceMetadata and microsoft.resources/subscriptions namespace. --- .../azure_fxci/arm-throttling-dashboard.tf | 116 ++++++++++++++---- 1 file changed, 92 insertions(+), 24 deletions(-) diff --git a/terraform/azure_fxci/arm-throttling-dashboard.tf b/terraform/azure_fxci/arm-throttling-dashboard.tf index 17f77ae4..6f9f4777 100644 --- a/terraform/azure_fxci/arm-throttling-dashboard.tf +++ b/terraform/azure_fxci/arm-throttling-dashboard.tf @@ -75,23 +75,57 @@ resource "azapi_resource" "fxci_arm_throttling_dashboard" { metadata = { inputs = [ { - name = "queryInputs" + name = "sharedTimeRange" + isOptional = true + }, + { + name = "options" value = { - timespan = { - duration = "P7D" - } - id = local.fxci_arm_throttling_dashboard_subscription_resource_id - chartType = 0 - metrics = [ - { - name = "Traffic" - resourceId = local.fxci_arm_throttling_dashboard_subscription_resource_id + chart = { + title = "ARM Traffic (7d)" + titleKind = 2 + metrics = [ + { + resourceMetadata = { + id = local.fxci_arm_throttling_dashboard_subscription_resource_id + } + name = "Traffic" + aggregationType = 1 + namespace = "microsoft.resources/subscriptions" + metricVisualization = { + displayName = "Traffic" + resourceDisplayName = "FXCI DevTest" + } + } + ] + timespan = { + relative = { + duration = 604800000 + } } - ] + visualization = { + chartType = 2 + legendVisualization = { + isVisible = true + position = 2 + hideSubtitle = false + } + axisVisualization = { + x = { + isVisible = true + axisType = 2 + } + y = { + isVisible = true + axisType = 1 + } + } + } + } } } ] - type = "Extension/Microsoft_Azure_Monitoring/PartType/MetricsChartPart" + type = "Extension/HubsExtension/PartType/MonitorChartPart" } }, { @@ -104,23 +138,57 @@ resource "azapi_resource" "fxci_arm_throttling_dashboard" { metadata = { inputs = [ { - name = "queryInputs" + name = "sharedTimeRange" + isOptional = true + }, + { + name = "options" value = { - timespan = { - duration = "P7D" - } - id = local.fxci_arm_throttling_dashboard_subscription_resource_id - chartType = 0 - metrics = [ - { - name = "Latency" - resourceId = local.fxci_arm_throttling_dashboard_subscription_resource_id + chart = { + title = "ARM Latency (7d)" + titleKind = 2 + metrics = [ + { + resourceMetadata = { + id = local.fxci_arm_throttling_dashboard_subscription_resource_id + } + name = "Latency" + aggregationType = 4 + namespace = "microsoft.resources/subscriptions" + metricVisualization = { + displayName = "Latency" + resourceDisplayName = "FXCI DevTest" + } + } + ] + timespan = { + relative = { + duration = 604800000 + } } - ] + visualization = { + chartType = 2 + legendVisualization = { + isVisible = true + position = 2 + hideSubtitle = false + } + axisVisualization = { + x = { + isVisible = true + axisType = 2 + } + y = { + isVisible = true + axisType = 1 + } + } + } + } } } ] - type = "Extension/Microsoft_Azure_Monitoring/PartType/MetricsChartPart" + type = "Extension/HubsExtension/PartType/MonitorChartPart" } }, { From 28109ce3128ff03216b79bfcb5269e96fc97af7a Mon Sep 17 00:00:00 2001 From: Jonathan Moss Date: Fri, 10 Apr 2026 14:44:34 -0400 Subject: [PATCH 5/5] Fix Traffic aggregationType and namespace casing Traffic metric supports Count (7), not Sum (1). Use proper ARM resource provider casing for namespace. --- terraform/azure_fxci/arm-throttling-dashboard.tf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/terraform/azure_fxci/arm-throttling-dashboard.tf b/terraform/azure_fxci/arm-throttling-dashboard.tf index 6f9f4777..7b5fe3db 100644 --- a/terraform/azure_fxci/arm-throttling-dashboard.tf +++ b/terraform/azure_fxci/arm-throttling-dashboard.tf @@ -90,8 +90,8 @@ resource "azapi_resource" "fxci_arm_throttling_dashboard" { id = local.fxci_arm_throttling_dashboard_subscription_resource_id } name = "Traffic" - aggregationType = 1 - namespace = "microsoft.resources/subscriptions" + aggregationType = 7 + namespace = "Microsoft.Resources/subscriptions" metricVisualization = { displayName = "Traffic" resourceDisplayName = "FXCI DevTest" @@ -154,7 +154,7 @@ resource "azapi_resource" "fxci_arm_throttling_dashboard" { } name = "Latency" aggregationType = 4 - namespace = "microsoft.resources/subscriptions" + namespace = "Microsoft.Resources/subscriptions" metricVisualization = { displayName = "Latency" resourceDisplayName = "FXCI DevTest"