microsoft / azure-container-apps

Roadmap and issues for Azure Container Apps
MIT License
372 stars 29 forks source link

Do not update app via az az containerapp update when secrets does not exists in Azure KeyVault #1306

Open wondertalik opened 1 month ago

wondertalik commented 1 month ago

Please provide us with the following information:

This issue is a: (mark with an x)

Issue description

Can't create a new revision using github actions or az cli using yaml file. The case here is that secret that is in Azure Key Vault does not exists but it still deployed without any errors.

I tried to look in deployments, system logs, log workspaces and nothing. No error, no description what is going on.

Steps to reproduce

  1. Create a config.yaml file
properties:
  configuration:
    secrets:
      - name: 'users-management-connection-string'
        identity: /subscriptions/[tenantId]/resourcegroups/group-tst/providers/microsoft.managedidentity/userassignedidentities/id-01-westeurope-test-identity
        keyVaultUrl: 'https://testvault.vault.azure.net/secrets/SecretDoesntExists'
template:
  containers:
    - name: 'react-app'
      image: 'testacr.azurecr.io/hello-world:latest'
      env:
        - name: OltpAppName
          value: 'Hello.App'
  1. Execute a command
az containerapp update -n ca-hello-api-tst -g group-tst --yaml config.yaml

or via github actions

    - name: deploy container app
      uses: azure/container-apps-deploy-action@v2
      with:
        containerAppName: ${{ inputs.containerAppName }}
        containerAppEnvironment: ${{ inputs.containerAppEnvironment }}
        resourceGroup: ${{ inputs.resourceGroup }}
        location: ${{ inputs.location }}
        acrName: ${{ inputs.acrName}}
        acrUsername: ${{ inputs.acrUserName}}
        acrPassword: ${{ inputs.acrPassword}}
        yamlConfigPath: 'config.yaml'

Expected behavior

Get some error that Keyvault does not have a secret.

Actual behavior [What actually happened.]

No errors, just deployed.

Additional context

az --version
azure-cli                         2.64.0

core                              2.64.0
telemetry                          1.1.0

Extensions:
containerapp                     1.0.0b3

Dependencies:
msal                              1.30.0
azure-mgmt-resource               23.1.1

Python location '/opt/homebrew/Cellar/azure-cli/2.64.0/libexec/bin/python'

Python (Darwin) 3.11.10 (main, Sep  7 2024, 01:03:31) [Clang 15.0.0 (clang-1500.3.9.4)]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.