Azure / azure-powershell-common

Microsoft Azure PowerShell common components
Other
35 stars 56 forks source link

adding prop and condition for OperationalInsightsEndpointResourceId #414

Closed andrewpethel closed 4 months ago

andrewpethel commented 5 months ago

Task: Update Azure.PowerShell.Common so that the Add-AzEnvironment auto discovery feature is agnostic for Sovereign Clouds.

Problem Description: The cmdlet's current implementation relies on the ExtendedProperties setting the OperationalInsightsEndpoint on the active AzureEnvironment. For user-added environments, such as those added via Add-AzEnvironment, both the -OperationalInsightsEndpoint and -OperationalInsightsEndpointResourceID parameters must be defined for the Invoke command to work. This requirement is documented, but could be clearer and more user-friendly.

Proposed Solution: This PR updates the MapArmToAzureEnvironment method to auto-populate the OperationalInsightsEndpoint and OperationalInsightsEndpointResourceId values, following a pattern similar to Synapse. This update would leverage the auto-discovery feature used with Add-AzEnvironment. By implementing this change, we can improve the robustness of the cmdlet and enhance the user experience for those working with custom Azure environments, namely Sovereign Clouds.

All tests pass (updated screenshot -- April 24, 2024):

image

andrewpethel commented 4 months ago

[heart] Ryan Pethel reacted to your message:


From: Jin Lei @.> Sent: Thursday, May 9, 2024 6:06:52 AM To: Azure/azure-powershell-common @.> Cc: Ryan Pethel @.>; Author @.> Subject: Re: [Azure/azure-powershell-common] adding prop and condition for OperationalInsightsEndpointResourceId (PR #414)

@msJinLei approved this pull request.

— Reply to this email directly, view it on GitHubhttps://github.com/Azure/azure-powershell-common/pull/414#pullrequestreview-2047211968, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A62P5UWY2DWS3O3TWIUAF5LZBMG7ZAVCNFSM6AAAAABFXGREV2VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDANBXGIYTCOJWHA. You are receiving this because you authored the thread.Message ID: @.***>