I am using Packer
to build images and upload them to Azure China. Some of the images are built successfully /the docker and consul images/ however the rest, such as the elastic search data and master are giving me the error below once packer build
was called.
Build 'azure-arm' errored: adal: Refresh request failed. Status Code = '400'.
Response body:
{"error":"invalid_request","error_description":"AADSTS90002: Tenant 'XXX'
not found. This may happen if there are no active subscriptions for the tenant.
Check with your subscription administrator. ...}
All the images are built from the same script:
packer build \
-var tag=$tag \
-var base_img=$base_img \
-var client_id=$client_id \
-var resource_group_name=$resource_group \
-var client_secret=$client_secret \
-var tenant_id=$tenant_id \
-var subscription_id=$subscription_id \
-var az_cloud_environment_name=China\
packer.json
Where the resource group, subscription id, tenant, secrets are the same for all the images. That is why I believe it is not due to issues with mismatched credentials or tenant. Any help/ideas will be appreciated.