From 0860e78921945e6630ad96915cfbd7b2762ccec3 Mon Sep 17 00:00:00 2001 From: Catalina Peralta Date: Wed, 30 Jun 2021 15:38:41 -0700 Subject: [PATCH] use constant --- sdk/azidentity/managed_identity_credential.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/azidentity/managed_identity_credential.go b/sdk/azidentity/managed_identity_credential.go index 1fdea871d447..cf64e837ed9c 100644 --- a/sdk/azidentity/managed_identity_credential.go +++ b/sdk/azidentity/managed_identity_credential.go @@ -72,7 +72,7 @@ func NewManagedIdentityCredential(id string, options *ManagedIdentityCredentialO client.msiType = msiType // check if no clientID is specified then check if it exists in an environment variable if len(id) == 0 { - if options.ID == 1 { + if options.ID == ResourceID { id = os.Getenv("AZURE_RESOURCE_ID") } else { id = os.Getenv("AZURE_CLIENT_ID")