Azure Bicep Container App Deployment Failure: Invalid image name

Matt Mazzola 0 Reputation points
2023-07-04T22:52:16.78+00:00

Context:

I am using Azure Bicep to deploy and Azure Container App.

I have used this deployment script before and it worked.
I think there are 2 possibilities:

  1. Bicep changed by upgrading and it now fails when it succeeded before
  2. My code changed and the value I am providing is in fact invalid

We can assume #2 since #1 is less likely:

Error Snippet:

'template.containers.schultztables-client.image' is invalid with details: Invalid value: "shared<removed>acr.azurecr.io/schultztables-client:202307040328"

However, the Azure Docs say:

  • image - This value takes the form of repository/image-name:tag which my value is

What I have tried:

  1. Verified the image actually exists in ACR

Questions:

  1. What else can I tried to deploy the container app using Bicep? Are there alternate forms of the image name?
  2. I am suspicious about the malformed http url "GET https:?scope=repository". Is this a clue to the problem?

Full Error:

==================================================================================================

Deploy sharedklgoyiacr.azurecr.io/schultztables-client:202307040328 Container App (What-If: False) ==================================================================================================

ERROR:

{

    "status": "Failed",

    "error": {

        "code": "DeploymentFailed",

        "target": "/subscriptions/375b0f6d-8ad5-412d-9e11-15d36d14dc63/resourceGroups/schultztables/providers/Microsoft.Resources/deployments/clientContainerApp",

        "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 'template.containers.schultztables-client.image' is invalid with details: 'Invalid value: "sharedklgoyiacr.azurecr.io/schultztables-client:202307040328": GET https:?scope=repository%3Aschultztables-client%3Apull&service=sharedklgoyiacr.azurecr.io: UNAUTHORIZED: authentication required, visit https://aka.ms/acr/authorization for more information.';."

            }

        ]

    }

}

Azure Container Apps
Azure Container Apps
An Azure service that provides a general-purpose, serverless container platform.
505 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Matt Mazzola 0 Reputation points
    2023-07-04T23:42:55.4366667+00:00

    The error message noted two issues:

    1. Possible invalid or missing image
    2. Issue with authentication

    I thought this issue was with #1 and was focusing there, but it turns out the issue was with typo on registryPassword causing authentication issue 🤦‍♂️.

    I re-tested with fixed authentication and it works now.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.