When running inside an Azure Container Instance, IDENTITY_ENDPOINT is NOT present, but IDENTITY_HEADER header is.
Strangely, Azure still expects Metadata=true. I can't find any documentation supporting this, but it was found using trial and error.
This PR adds functionality to decide whether to use X-IDENTITY-HEADER or Metadata, based on the presence of the IDENTITY_ENDPOINT variable. This should work for both regular cases, VM's and ACI's.
When running inside an Azure Container Instance,
IDENTITY_ENDPOINT
is NOT present, butIDENTITY_HEADER
header is.Strangely, Azure still expects
Metadata=true
. I can't find any documentation supporting this, but it was found using trial and error.This PR adds functionality to decide whether to use
X-IDENTITY-HEADER
orMetadata
, based on the presence of theIDENTITY_ENDPOINT
variable. This should work for both regular cases, VM's and ACI's.