Giter VIP home page Giter VIP logo

Comments (5)

howang-ms avatar howang-ms commented on September 2, 2024

In the YAML you provided above, you didn't enable the system assigned managed identity. You should use something like this in your YAML:

identity:
  type: SystemAssigned

For more detail, please refer to here.

from azure-container-apps.

vturecek avatar vturecek commented on September 2, 2024

This is the problem in the YAML spec:

identity:
  type: None

It should be:

identity:
  type: SystemAssigned

from azure-container-apps.

knobel-dk avatar knobel-dk commented on September 2, 2024

I will check tomorrow. Thank you

from azure-container-apps.

knobel-dk avatar knobel-dk commented on September 2, 2024

I did as adviced and am still getting ERROR: (InvalidParameterValueInContainerTemplate) The following field(s) are either invalid or missing. Field 'configuration.secrets' is invalid with details: 'Invalid value: "statamickey": Unable to get value using Managed identity system for secret statamickey. Error: unable to fetch secret 'statamickey' using Managed identity 'system'';.

Here is the output from az containerapp create -n $appName -g $resourceGroup --yaml [YAML_ABOVE]

{
  "id": "/subscriptions/XXXXXXXXXXXXXXXXXXXXXXXXXXXXX/resourceGroups/YYYYYYYYYYYY/providers/Microsoft.App/containerapps/yyyyyyyyyyyyy",
  "identity": {
    "principalId": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "tenantId": "***",
    "type": "SystemAssigned"
  },
  "location": "North Europe",
  "name": "yyyyyyyyyyyyy",
  "properties": {
    "configuration": {
      "activeRevisionsMode": "Single",
      "dapr": null,
      "ingress": {
        "additionalPortMappings": null,
        "allowInsecure": false,
        "clientCertificateMode": null,
        "corsPolicy": null,
        "customDomains": null,
        "exposedPort": 0,
        "external": true,
        "fqdn": "yyyyyyyyyyyyy.somename-804dbc47.northeurope.azurecontainerapps.io",
        "ipSecurityRestrictions": null,
        "stickySessions": null,
        "targetPort": 80,
        "traffic": [
          {
            "latestRevision": true,
            "weight": 100
          }
        ],
        "transport": "Auto"
      },
      "maxInactiveRevisions": 100,
      "registries": [
        {
          "identity": "",
          "passwordSecretRef": "ZZZZZZZZZZZZZZZZZZZZZZZZZ",
          "server": "zzzzzzzzzzzzzzzz.azurecr.io",
          "username": "zzzzzzzzzzzzzzzz"
        }
      ],
      "secrets": [
        {
          "name": "secretpassword"
        },
        {
          "name": "ZZZZZZZZZZZZZZZZZZZZZZZZZ"
        }
      ],
      "service": null
    },
    "customDomainVerificationId": "abcdabcdabcdabcdabcd",
    "delegatedIdentities": [],
    "environmentId": "/subscriptions/XXXXXXXXXXXXXXXXXXXXXXXXXXXXX/resourceGroups/YYYYYYYYYYYY/providers/Microsoft.App/managedEnvironments/container-apps-env-yyyyyyyyyyyyy",
    "eventStreamEndpoint": "https://northeurope.azurecontainerapps.dev/subscriptions/XXXXXXXXXXXXXXXXXXXXXXXXXXXXX/resourceGroups/YYYYYYYYYYYY/containerApps/yyyyyyyyyyyyy/eventstream",
    "latestReadyRevisionName": "yyyyyyyyyyyyy--9156474657",
    "latestRevisionFqdn": "yyyyyyyyyyyyy--9156474657.somename-804dbc47.northeurope.azurecontainerapps.io",
    "latestRevisionName": "yyyyyyyyyyyyy--9156474657",
    "managedEnvironmentId": "/subscriptions/XXXXXXXXXXXXXXXXXXXXXXXXXXXXX/resourceGroups/YYYYYYYYYYYY/providers/Microsoft.App/managedEnvironments/container-apps-env-yyyyyyyyyyyyy",
    "outboundIpAddresses": [
      "SOME.IP.xxx.yyy",
      "SOME.IP.xxx.yyy",
      "SOME.IP.xxx.yyy",
      "...."
    ],
    "provisioningState": "Succeeded",
    "runningStatus": "Running",
    "template": {
      "containers": [
        {
          "image": "zzzzzzzzzzzzzzzz.azurecr.io/yyyyyyyyyyyyy:latest",
          "name": "yyyyyyyyyyyyy",
          "probes": [
            {
              "httpGet": {
                "path": "/",
                "port": 80,
                "scheme": "HTTP"
              },
              "initialDelaySeconds": 60,
              "periodSeconds": 10,
              "type": "Liveness"
            }
          ],
          "resources": {
            "cpu": 0.25,
            "ephemeralStorage": "1Gi",
            "memory": "0.5Gi"
          }
        }
      ],
      "initContainers": null,
      "revisionSuffix": "",
      "scale": {
        "maxReplicas": 2,
        "minReplicas": 1,
        "rules": [
          {
            "custom": {
              "metadata": {
                "type": "Utilization",
                "value": "60"
              },
              "type": "cpu"
            },
            "name": "cpu-over-sixty"
          }
        ]
      },
      "serviceBinds": null,
      "terminationGracePeriodSeconds": null,
      "volumes": []
    },
    "workloadProfileName": "Consumption"
  },
  "resourceGroup": "docs-datapult-dk",
  "systemData": {
    "createdAt": "2024-05-20T07:11:21.0834188",
    "createdBy": "***",
    "createdByType": "Application",
    "lastModifiedAt": "2024-05-20T12:18:45.7886352",
    "lastModifiedBy": "***",
    "lastModifiedByType": "Application"
  },
  "type": "Microsoft.App/containerApps"
}

from azure-container-apps.

howang-ms avatar howang-ms commented on September 2, 2024

Hi @knobel-dk
From the error message, it seems the system assigned identity don't have the permission to your key vault.
Please note, you might need multiple steps to do this, since the system assigned identity is created with container app. You need to create a dummy app first to get the object id the system assigned identity.

from azure-container-apps.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.