Skip to content

Conversation

@MacMur85
Copy link
Contributor

Description

A change to the implementation of the Diagnostic Setting module required to eliminate the deprecated form of metric definition.

Old implementation:

module "diagnostic-settings" {
  source = "../diagnostic-settings"

  name                       = "${var.name}-diagnostic-setting"
  target_resource_id         = azurerm_api_management.apim.id
  log_analytics_workspace_id = var.log_analytics_workspace_id
  enabled_log                = var.monitor_diagnostic_setting_apim_enabled_logs
  metric                     = var.monitor_diagnostic_setting_apim_metrics
  metric_enabled             = var.metric_enabled
}

New implementation:

module "diagnostic-settings" {

  source = "../diagnostic-settings"

  name                       = "${var.name}-diagnostic-setting"
  target_resource_id         = azurerm_api_management.apim.id
  log_analytics_workspace_id = var.log_analytics_workspace_id
  enabled_log                = var.monitor_diagnostic_setting_apim_enabled_logs
  enabled_metric             = var.monitor_diagnostic_setting_apim_metrics

}

Context

This PR is tied to a similar one in the Templates repository: PR-220

Type of changes

  • Refactoring (non-breaking change)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would change existing functionality)
  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I am familiar with the contributing guidelines
  • I have followed the code style of the project
  • I have added tests to cover my changes
  • I have updated the documentation accordingly
  • This PR is a result of pair or mob programming

Sensitive Information Declaration

To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.

  • I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.

@MacMur85 MacMur85 force-pushed the fix/DTOSS-9703-update-diagnostic-settings-module branch from d1d2dd1 to 784938d Compare August 27, 2025 07:52
@github-actions
Copy link

github-actions bot commented Aug 27, 2025

Unit Test Results

✔️ Tests 779 / 779 - passed in 61.3s
📝 Coverage 56.81%
📏 4244 / 7338 lines covered 🌿 1014 / 1918 branches covered
🔍 click here for more details

✏️ updated for commit 26e39ed

@MacMur85 MacMur85 force-pushed the fix/DTOSS-9703-update-diagnostic-settings-module branch from 784938d to 26e39ed Compare August 29, 2025 10:41
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant