Azure / arm-template-whatif

A repository to track issues related to what-if noise suppression
MIT License
90 stars 14 forks source link

Secret reference in Azure Container App scale rule reported as a change #332

Open vkorvach opened 1 year ago

vkorvach commented 1 year ago

Describe the noise

When an Azure Container Apps resource has a reference to a secret in a scale rule metadata section, what-if reports it as a change. Resource type Microsoft.App/containerApps

apiVersion 2022-06-01-preview

Client Azure CLI

Relevant ARM Template code (we only need the resource object for the above resourceType and apiVersion, but if it's easier you can include the entire template

az-container-app.bicep


@secure()
param azHubBootsrapServer string

...

 scale: {
        minReplicas: minReplicas
        maxReplicas: maxReplicas
        rules: [
          {
            name: 'kafka-scaling-rule'
            custom: {
              type: 'kafka'
              metadata: {
                bootstrapServers: azHubBootsrapServer
                consumerGroup: consumerGroup
                activationLagThreshold: '1'
                lagThreshold: '5'
                topic: 'xxxxxxxx'
              }
              auth: [
               ...
              ]
            }
          }
        ]
      }
...

Expected response (i.e. "I expected no noise since the template has not been modified since the resources were deployed)

No changes are reported since no changes were made to a resource.

Current (noisy) response (either include a screenshot of the what-if output, or copy/paste the text)

  ~ Microsoft.App/containerApps/xxxxxxxx [2022-06-01-preview]

    ~ properties.template.scale.rules: [
      ~ 0:

        ~ custom.metadata.bootstrapServers: "xxxxxxxx.servicebus.windows.net:9093" => "*******"

      ]

Additional context Add any other context about the problem here.