microsoft / microsoft/AzureTRE

Event Grid/AGW diagnostic settings are being reconfigured on each deploy

Open
#4,613 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
235
Forks
192
Avg merge
1d 23h
Merged PRs (30d)
13

Description

Seeing the following drift on each subsequent deploy, related to event grid and app gateway diagnostic settings:

# module.airlock_resources.azurerm_monitor_diagnostic_setting.eventgrid_custom_topics["evgt-airlock-data-deletion-v2-***"] will be updated in-place
  ~ resource "azurerm_monitor_diagnostic_setting" "eventgrid_custom_topics" ***
        id                             = "/subscriptions/XXXXXXX/resourceGroups/rg-***/providers/Microsoft.EventGrid/topics/evgt-airlock-data-deletion-v2-***|evgt-airlock-data-deletion-v2-***-diagnostics"
        name                           = "evgt-airlock-data-deletion-v2-***-diagnostics"
        # (5 unchanged attributes hidden)

      ~ enabled_log (known after apply)
      - enabled_log ***
          - category       = "DataPlaneRequests" -> null
            # (1 unchanged attribute hidden)

          - retention_policy ***
              - days    = 0 -> null
              - enabled = false -> null
            ***
        ***
      - enabled_log ***
          - category       = "DeliveryFailures" -> null
            # (1 unchanged attribute hidden)

          - retention_policy ***
              - days    = 0 -> null
              - enabled = false -> null
            ***
        ***
      - enabled_log ***
          - category       = "PublishFailures" -> null
            # (1 unchanged attribute hidden)

          - retention_policy ***
              - days    = 0 -> null
              - enabled = false -> null
            ***
        ***

        # (1 unchanged block hidden)
    ***

  # module.airlock_resources.azurerm_monitor_diagnostic_setting.eventgrid_custom_topics["evgt-airlock-notification-v2-***"] will be updated in-place
  ~ resource "azurerm_monitor_diagnostic_setting" "eventgrid_custom_topics" ***
        id                             = "/subscriptions/XXXXXXX/resourceGroups/rg-***/providers/Microsoft.EventGrid/topics/evgt-airlock-notification-v2-***|evgt-airlock-notification-v2-***-diagnostics"
        name                           = "evgt-airlock-notification-v2-***-diagnostics"
        # (5 unchanged attributes hidden)

      ~ enabled_log (known after apply)
      - enabled_log ***
          - category       = "DataPlaneRequests" -> null
            # (1 unchanged attribute hidden)

          - retention_policy ***
              - days    = 0 -> null
              - enabled = false -> null
            ***
        ***
      - enabled_log ***
          - category       = "DeliveryFailures" -> null
            # (1 unchanged attribute hidden)

          - retention_policy ***
              - days    = 0 -> null
              - enabled = false -> null
            ***
        ***
      - enabled_log ***
          - category       = "PublishFailures" -> null
            # (1 unchanged attribute hidden)

          - retention_policy ***
              - days    = 0 -> null
              - enabled = false -> null
            ***
        ***

        # (1 unchanged block hidden)
    ***

  # module.airlock_resources.azurerm_monitor_diagnostic_setting.eventgrid_custom_topics["evgt-airlock-status-changed-v2-***"] will be updated in-place
  ~ resource "azurerm_monitor_diagnostic_setting" "eventgrid_custom_topics" ***
        id                             = "/subscriptions/XXXXXXX/resourceGroups/rg-***/providers/Microsoft.EventGrid/topics/evgt-airlock-status-changed-v2-***|evgt-airlock-status-changed-v2-***-diagnostics"
        name                           = "evgt-airlock-status-changed-v2-***-diagnostics"
        # (5 unchanged attributes hidden)

      ~ enabled_log (known after apply)
      - enabled_log ***
          - category       = "DataPlaneRequests" -> null
            # (1 unchanged attribute hidden)

          - retention_policy ***
              - days    = 0 -> null
              - enabled = false -> null
            ***
        ***
      - enabled_log ***
          - category       = "DeliveryFailures" -> null
            # (1 unchanged attribute hidden)

          - retention_policy ***
              - days    = 0 -> null
              - enabled = false -> null
            ***
        ***
      - enabled_log ***
          - category       = "PublishFailures" -> null
            # (1 unchanged attribute hidden)

          - retention_policy ***
              - days    = 0 -> null
              - enabled = false -> null
            ***
        ***

        # (1 unchanged block hidden)
    ***

  # module.airlock_resources.azurerm_monitor_diagnostic_setting.eventgrid_custom_topics["evgt-airlock-step-result-v2-***"] will be updated in-place
  ~ resource "azurerm_monitor_diagnostic_setting" "eventgrid_custom_topics" ***
        id                             = "/subscriptions/XXXXXXX/resourceGroups/rg-***/providers/Microsoft.EventGrid/topics/evgt-airlock-step-result-v2-***|evgt-airlock-step-result-v2-***-diagnostics"
        name                           = "evgt-airlock-step-result-v2-***-diagnostics"
        # (5 unchanged attributes hidden)

      ~ enabled_log (known after apply)
      - enabled_log ***
          - category       = "DataPlaneRequests" -> null
            # (1 unchanged attribute hidden)

          - retention_policy ***
              - days    = 0 -> null
              - enabled = false -> null
            ***
        ***
      - enabled_log ***
          - category       = "DeliveryFailures" -> null
            # (1 unchanged attribute hidden)

          - retention_policy ***
              - days    = 0 -> null
              - enabled = false -> null
            ***
        ***
      - enabled_log ***
          - category       = "PublishFailures" -> null
            # (1 unchanged attribute hidden)

          - retention_policy ***
              - days    = 0 -> null
              - enabled = false -> null
            ***
        ***

        # (1 unchanged block hidden)
    ***

  # module.airlock_resources.azurerm_monitor_diagnostic_setting.eventgrid_system_topics["evgt-airlock-export-approved-v2-***"] will be updated in-place
  ~ resource "azurerm_monitor_diagnostic_setting" "eventgrid_system_topics" ***
        id                             = "/subscriptions/XXXXXXX/resourceGroups/rg-***/providers/Microsoft.EventGrid/systemTopics/evgt-airlock-export-approved-v2-***|evgt-airlock-export-approved-v2-***-diagnostics"
        name                           = "evgt-airlock-export-approved-v2-***-diagnostics"
        # (5 unchanged attributes hidden)

      ~ enabled_log (known after apply)
      - enabled_log ***
          - category       = "DeliveryFailures" -> null
            # (1 unchanged attribute hidden)

          - retention_policy ***
              - days    = 0 -> null
              - enabled = false -> null
            ***
        ***

        # (1 unchanged block hidden)
    ***

  # module.airlock_resources.azurerm_monitor_diagnostic_setting.eventgrid_system_topics["evgt-airlock-import-blocked-v2-***"] will be updated in-place
  ~ resource "azurerm_monitor_diagnostic_setting" "eventgrid_system_topics" ***
        id                             = "/subscriptions/XXXXXXX/resourceGroups/rg-***/providers/Microsoft.EventGrid/systemTopics/evgt-airlock-import-blocked-v2-***|evgt-airlock-import-blocked-v2-***-diagnostics"
        name                           = "evgt-airlock-import-blocked-v2-***-diagnostics"
        # (5 unchanged attributes hidden)

      ~ enabled_log (known after apply)
      - enabled_log ***
          - category       = "DeliveryFailures" -> null
            # (1 unchanged attribute hidden)

          - retention_policy ***
              - days    = 0 -> null
              - enabled = false -> null
            ***
        ***

        # (1 unchanged block hidden)
    ***

  # module.airlock_resources.azurerm_monitor_diagnostic_setting.eventgrid_system_topics["evgt-airlock-import-in-progress-v2-***"] will be updated in-place
  ~ resource "azurerm_monitor_diagnostic_setting" "eventgrid_system_topics" ***
        id                             = "/subscriptions/XXXXXXX/resourceGroups/rg-***/providers/Microsoft.EventGrid/systemTopics/evgt-airlock-import-in-progress-v2-***|evgt-airlock-import-in-progress-v2-***-diagnostics"
        name                           = "evgt-airlock-import-in-progress-v2-***-diagnostics"
        # (5 unchanged attributes hidden)

      ~ enabled_log (known after apply)
      - enabled_log ***
          - category       = "DeliveryFailures" -> null
            # (1 unchanged attribute hidden)

          - retention_policy ***
              - days    = 0 -> null
              - enabled = false -> null
            ***
        ***

        # (1 unchanged block hidden)
    ***

  # module.airlock_resources.azurerm_monitor_diagnostic_setting.eventgrid_system_topics["evgt-airlock-import-rejected-v2-***"] will be updated in-place
  ~ resource "azurerm_monitor_diagnostic_setting" "eventgrid_system_topics" ***
        id                             = "/subscriptions/XXXXXXX/resourceGroups/rg-***/providers/Microsoft.EventGrid/systemTopics/evgt-airlock-import-rejected-v2-***|evgt-airlock-import-rejected-v2-***-diagnostics"
        name                           = "evgt-airlock-import-rejected-v2-***-diagnostics"
        # (5 unchanged attributes hidden)

      ~ enabled_log (known after apply)
      - enabled_log ***
          - category       = "DeliveryFailures" -> null
            # (1 unchanged attribute hidden)

          - retention_policy ***
              - days    = 0 -> null
              - enabled = false -> null
            ***
        ***

        # (1 unchanged block hidden)
    ***

  # module.appgateway.azurerm_monitor_diagnostic_setting.agw will be updated in-place
  ~ resource "azurerm_monitor_diagnostic_setting" "agw" ***
        id                             = "/subscriptions/XXXXXXX/resourceGroups/rg-***/providers/Microsoft.Network/applicationGateways/agw-***|diagnostics-agw-***"
        name                           = "diagnostics-agw-***"
        # (5 unchanged attributes hidden)

      ~ enabled_log (known after apply)
      - enabled_log ***
          - category       = "ApplicationGatewayAccessLog" -> null
            # (1 unchanged attribute hidden)

          - retention_policy ***
              - days    = 0 -> null
              - enabled = false -> null
            ***
        ***
      - enabled_log ***
          - category       = "ApplicationGatewayFirewallLog" -> null
            # (1 unchanged attribute hidden)

          - retention_policy ***
              - days    = 0 -> null
              - enabled = false -> null
            ***
        ***
      - enabled_log ***
          - category       = "ApplicationGatewayPerformanceLog" -> null
            # (1 unchanged attribute hidden)

          - retention_policy ***
              - days    = 0 -> null
              - enabled = false -> null
            ***
        ***

        # (1 unchanged block hidden)
    ***

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the module.airlock_resources.azurerm_monitor_diagnostic_setting.eventgrid_custom_topics and eventgrid_system_topics resources, then inspect module.appgateway.azurerm_monitor_diagnostic_setting.agw. Reproduce the plan and compare the enabled_log and retention_policy values; done means subsequent deploys no longer reconfigure these diagnostic settings without an intentional change.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, terraform
Domain
cloud, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.