Azure-Samples / apim-genai-gateway-toolkit

A repo to accelerate development and testing of GenAI Gateways built with Azure API Management. Includes various capabilities as examples/starters.
MIT License
17 stars 6 forks source link

Fresh deployment fails the first time #3

Closed lucashuet93 closed 1 month ago

lucashuet93 commented 1 month ago

Please provide us with the following information:

This issue is for a: (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Any log messages given by the failure

{
  "status": "Failed",
  "error": {
    "code": "DeploymentFailed",
    "target": "/subscriptions/ed1f1918-2165-4549-8356-ab1736f12fe8/providers/Microsoft.Resources/deployments/sims-pv001",
    "message": "At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.",
    "details": [
      {
        "code": "ResourceDeploymentFailure",
        "target": "/subscriptions/ed1f1918-2165-4549-8356-ab1736f12fe8/resourceGroups/rg-pv001-dev-eastus-001/providers/Microsoft.Resources/deployments/simulatorPAYG1",
        "message": "The resource write operation failed to complete successfully, because it reached terminal provisioning state 'Failed'.",
        "details": [
          {
            "code": "DeploymentFailed",
            "target": "/subscriptions/ed1f1918-2165-4549-8356-ab1736f12fe8/resourceGroups/rg-pv001-dev-eastus-001/providers/Microsoft.Resources/deployments/simulatorPAYG1",
            "message": "At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.",
            "details": [
              {
                "code": "InvalidParameterValueInContainerTemplate",
                "message": "The following field(s) are either invalid or missing. Field 'configuration.secrets' is invalid with details: 'Invalid value: \"simulator-api-key\": Unable to get value using Managed identity /subscriptions/ed1f1918-2165-4549-8356-ab1736f12fe8/resourceGroups/rg-pv001-dev-eastus-001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/aoaisim-pv001-dev-payg1-identity for secret simulator-api-key. Error: unable to fetch secret 'simulator-api-key' using Managed identity '/subscriptions/ed1f1918-2165-4549-8356-ab1736f12fe8/resourceGroups/rg-pv001-dev-eastus-001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/aoaisim-pv001-dev-payg1-identity''; Field 'configuration.secrets' is invalid with details: 'Invalid value: \"app-insights-connection-string\": Unable to get value using Managed identity /subscriptions/ed1f1918-2165-4549-8356-ab1736f12fe8/resourceGroups/rg-pv001-dev-eastus-001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/aoaisim-pv001-dev-payg1-identity for secret app-insights-connection-string. Error: unable to fetch secret 'app-insights-connection-string' using Managed identity '/subscriptions/ed1f1918-2165-4549-8356-ab1736f12fe8/resourceGroups/rg-pv001-dev-eastus-001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/aoaisim-pv001-dev-payg1-identity'';."
              }
            ]
          }
        ]
      },
      {
        "code": "ResourceDeploymentFailure",
        "target": "/subscriptions/ed1f1918-2165-4549-8356-ab1736f12fe8/resourceGroups/rg-pv001-dev-eastus-001/providers/Microsoft.Resources/deployments/simulatorPTU1",
        "message": "The resource write operation failed to complete successfully, because it reached terminal provisioning state 'Failed'.",
        "details": [
          {
            "code": "DeploymentFailed",
            "target": "/subscriptions/ed1f1918-2165-4549-8356-ab1736f12fe8/resourceGroups/rg-pv001-dev-eastus-001/providers/Microsoft.Resources/deployments/simulatorPTU1",
            "message": "At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.",
            "details": [
              {
                "code": "InvalidParameterValueInContainerTemplate",
                "message": "The following field(s) are either invalid or missing. Field 'configuration.secrets' is invalid with details: 'Invalid value: \"simulator-api-key\": Unable to get value using Managed identity /subscriptions/ed1f1918-2165-4549-8356-ab1736f12fe8/resourceGroups/rg-pv001-dev-eastus-001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/aoaisim-pv001-dev-ptu1-identity for secret simulator-api-key. Error: unable to fetch secret 'simulator-api-key' using Managed identity '/subscriptions/ed1f1918-2165-4549-8356-ab1736f12fe8/resourceGroups/rg-pv001-dev-eastus-001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/aoaisim-pv001-dev-ptu1-identity''; Field 'configuration.secrets' is invalid with details: 'Invalid value: \"app-insights-connection-string\": Unable to get value using Managed identity /subscriptions/ed1f1918-2165-4549-8356-ab1736f12fe8/resourceGroups/rg-pv001-dev-eastus-001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/aoaisim-pv001-dev-ptu1-identity for secret app-insights-connection-string. Error: unable to fetch secret 'app-insights-connection-string' using Managed identity '/subscriptions/ed1f1918-2165-4549-8356-ab1736f12fe8/resourceGroups/rg-pv001-dev-eastus-001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/aoaisim-pv001-dev-ptu1-identity'';."
              }
            ]
          }
        ]
      },
      {
        "code": "ResourceDeploymentFailure",
        "target": "/subscriptions/ed1f1918-2165-4549-8356-ab1736f12fe8/resourceGroups/rg-pv001-dev-eastus-001/providers/Microsoft.Resources/deployments/simulatorPAYG2",
        "message": "The resource write operation failed to complete successfully, because it reached terminal provisioning state 'Failed'.",
        "details": [
          {
            "code": "DeploymentFailed",
            "target": "/subscriptions/ed1f1918-2165-4549-8356-ab1736f12fe8/resourceGroups/rg-pv001-dev-eastus-001/providers/Microsoft.Resources/deployments/simulatorPAYG2",
            "message": "At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.",
            "details": [
              {
                "code": "InvalidParameterValueInContainerTemplate",
                "message": "The following field(s) are either invalid or missing. Field 'configuration.secrets' is invalid with details: 'Invalid value: \"app-insights-connection-string\": Unable to get value using Managed identity /subscriptions/ed1f1918-2165-4549-8356-ab1736f12fe8/resourceGroups/rg-pv001-dev-eastus-001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/aoaisim-pv001-dev-payg2-identity for secret app-insights-connection-string. Error: unable to fetch secret 'app-insights-connection-string' using Managed identity '/subscriptions/ed1f1918-2165-4549-8356-ab1736f12fe8/resourceGroups/rg-pv001-dev-eastus-001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/aoaisim-pv001-dev-payg2-identity''; Field 'configuration.secrets' is invalid with details: 'Invalid value: \"simulator-api-key\": Unable to get value using Managed identity /subscriptions/ed1f1918-2165-4549-8356-ab1736f12fe8/resourceGroups/rg-pv001-dev-eastus-001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/aoaisim-pv001-dev-payg2-identity for secret simulator-api-key. Error: unable to fetch secret 'simulator-api-key' using Managed identity '/subscriptions/ed1f1918-2165-4549-8356-ab1736f12fe8/resourceGroups/rg-pv001-dev-eastus-001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/aoaisim-pv001-dev-payg2-identity'';."
              }
            ]
          }
        ]
      }
    ]
  }
}

Expected/desired behavior

Mention any other details that might be useful

Existing ACA Issues (1, 2, 3) mention the secret name cannot include dashes and needs to be lowercase.