Skip to content

Conversation

@msJinLei
Copy link
Contributor

@msJinLei msJinLei commented Aug 4, 2021

@msJinLei
Copy link
Contributor Author

msJinLei commented Aug 4, 2021

                if (string.IsNullOrEmpty(armMetadataRequestUri))
                {
                    armMetadataRequestUri = Environment.GetEnvironmentVariable(ArmMetadataEnvVariable);
                    if (string.IsNullOrEmpty(armMetadataRequestUri))
                    {
                        armMetadataRequestUri = DefaultArmMetaDataEndpoint;
                    }
                    else
                    {
                        debugLogger?.Invoke($"Get {armMetadataRequestUri} from environment variable {ArmMetadataEnvVariable}");
                    }
                }
                if (DisableArmMetaDataEndpoint.Equals(armMetadataRequestUri?.Trim().ToUpper()))
                {
                    warningLogger?.Invoke($"Discover feature is disabled by environment variable {ArmMetadataEnvVariable}");
                    armMetadataRequestUri = null;
                }
                if (!string.IsNullOrEmpty(armMetadataRequestUri))
                {

Copy link
Member

@isra-fel isra-fel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.
You might as well update the ManagementPortalUrl in example 3 of Get-AzEnvironment.md

@msJinLei msJinLei merged commit bd108fc into Azure:main Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants