How To Fix This Error - ‘Azure connector not picking up the Subscription Id’ In Harness CD Module?

Module

  • Continuous Delivery

Environment

  • Infrastructure: Harness Saas
  • OS: Mac, Windows or Linux

Issue

I was working on a use-case to deploy a docker image from ACR repo to AKS cluster and while setting up the Artifact Repository in the Service step, my Azure connector is not picking up the Subscription id and other details.

Resolution

  1. Make sure you have a Service Principal/Managed identity created , as you will need to connect Harness to Azure app registrations. Check the IAM roles and permissions assigned to the container registry. You will need to assign the Reader role.

Example:

  1. In case you have picked the option, Use the credentials of a specific Harness Delegate (IAM role, service account, managed identity etc) while creating an ACR Connector, make sure the Kubernetes cluster your Delegate is running, has the relevant IAM roles and permission, that is the Owner role must be assigned.

Example:

  1. Make sure you select the Client Id from the Managed Identity of the app registered as shown below.

  1. If your ACR connector setup is done as per the instructions above, the Artifact Details will automatically pick up the Subscription id, Registry, Repository as shown below.