Use a customer-managed key (CMK) with an Docker "Container Instance"

LIGEngelsen 75 Reputation points
2025-04-22T12:40:47.2533333+00:00

I'm building my first container instance in Azure.

When I get to the "Advanced" options, I have the ability to configure "key management".

I want to use a customer-managed key (CMK). I followed the instructions within this KB article to enable a customer-managed key. However, when I try creating the container instance, they CMK option is (still) greyed out.

Screenshot 2025-04-21 at 10.02.03 PM

What do I need to do, to use a CMK with an Azure Container Instance?

Azure Container Instances
Azure Container Instances
An Azure service that provides customers with a serverless container experience.
753 questions
{count} votes

Accepted answer
  1. TP 118.8K Reputation points Moderator
    2025-04-22T15:48:08.2+00:00

    Hi,

    It appears you don't have ACI service principal in your tenant. To create it, please open up Azure Cloud Shell and run below command:

    az ad sp create --id 6bb8e274-af5d-4df2-98a3-4fd78b4cafd9
    
    

    After executing the command you can double-check it has been created using below command:

    az ad sp show --id 6bb8e274-af5d-4df2-98a3-4fd78b4cafd9
    
    

    Now that service principal has been created, please close the Create container instance screen (as shown in your screenshot) if you have it open, and then start the Create process from scratch. When you get to Advanced tab check to see if CMK option is enabled.

    When creating your Key Vault, please refer to article below. Additionally, the article has important information related to encrypting ACI using CMK:

    Encrypt deployment data

    https://learn.microsoft.com/en-us/azure/container-instances/container-instances-encrypt-data

    Please click Accept Answer and upvote if the above was helpful. If you have questions please add a comment below.

    Thanks.

    -TP


0 additional answers

Sort by: Most helpful

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.