Adding Azure account fails in Halyard. Azure subscription is not recognized

9/8/2018

I am trying to deploy Spinnaker to a K8s cluster using Halyard running on an Ubuntu 16.04 VM. The Kubernetes cluster is deployed on Azure Kubernetes Service.

I am following the instructions here to add an Azure account to Halyard: https://www.spinnaker.io/setup/install/providers/azure/

I get the error in the last steps.

hal config provider azure account add my-azure-account --client-id $APP_ID --tenant-id $TENANT_ID --subscription-id $SUBSCRIPTION_ID --default-key-vault $VAULT_NAME --default-resource-group $RESOURCE_GROUP --app-key

The appKey (password) of your service principal.:

Get current deployment
Success

Add the my-azure-account account

Failure Problems in default.provider.azure: ! ERROR Error instantiating Azure credentials: The subscription ‘XXX-XX-X-XXXXXX’ could not be found. ? Follow instructions here https://aka.ms/azspinconfig to setup azure credentials.

Failed to add account my-azure-account for provider azure.

Has anyone successfully deployed Spinnaker on Azure using Halyard?

I see the following errors in halyard.log:

enter image description here

-- jraj
azure
kubernetes
spinnaker

1 Answer

9/8/2018

Failure Problems in default.provider.azure: ! ERROR Error instantiating Azure credentials: The subscription ‘XXX-XX-X-XXXXXX’ could not be found.

Kindly verify the subscription ID which you are passing in Azure account.

First, make sure the provider is enabled:

hal config provider azure enable

Next, run the following hal command to add an account named my-azure-account to your list of Azure accounts:

hal config provider azure account add my-azure-account \
  --client-id $APP_ID \
  --tenant-id $TENANT_ID \
  --subscription-id $SUBSCRIPTION_ID \
  --default-key-vault $VAULT_NAME \
  --default-resource-group $RESOURCE_GROUP \
  --app-key
-- CHEEKATLAPRADEEP-MSFT
Source: StackOverflow