Azure / Azure/azure-powershell
[Feature]: Need a way to set up extendedproperty by Set-AzEnvironment
- Dominant language
- C#
- Stars
- 4.8k
- Forks
- 4.3k
- Avg merge
- 3d 14h
- Merged PRs (30d)
- 54
Description
### Description of the new feature
```
PS C:\Azure\upstream\azure-powershell> (Get-AzEnvironment).ExtendedProperties
Key Value
--- -----
OperationalInsightsEndpoint https://api.loganalytics.us/v1
AzureSynapseAnalyticsEndpointSuffix dev.azuresynapse.usgovcloudapi.net
AzureAnalysisServicesEndpointSuffix asazure.usgovcloudapi.net
MicrosoftGraphEndpointResourceId https://graph.microsoft.us/
ManagedHsmServiceEndpointSuffix managedhsm.usgovcloudapi.net
OperationalInsightsEndpointResourceId https://api.loganalytics.us
AnalysisServicesEndpointResourceId https://region.asazure.usgovcloudapi.net
ManagedHsmServiceEndpointResourceId https://managedhsm.usgovcloudapi.net
AzureSynapseAnalyticsEndpointResourceId https://dev.azuresynapse.usgovcloudapi.net
MicrosoftGraphUrl https://graph.microsoft.us
ContainerRegistryEndpointResourceId https://management.usgovcloudapi.net
OperationalInsightsEndpoint https://api.loganalytics.azure.cn/v1
AzureSynapseAnalyticsEndpointSuffix dev.azuresynapse.azure.cn
AzureAnalysisServicesEndpointSuffix asazure.chinacloudapi.cn
MicrosoftGraphEndpointResourceId https://microsoftgraph.chinacloudapi.cn/
ManagedHsmServiceEndpointSuffix managedhsm.azure.cn
OperationalInsightsEndpointResourceId https://api.loganalytics.azure.cn
AnalysisServicesEndpointResourceId https://region.asazure.chinacloudapi.cn
ManagedHsmServiceEndpointResourceId https://managedhsm.azure.cn
AzureSynapseAnalyticsEndpointResourceId https://dev.azuresynapse.azure.cn
MicrosoftGraphUrl https://microsoftgraph.chinacloudapi.cn
ContainerRegistryEndpointResourceId https://management.chinacloudapi.cn
ManagedHsmServiceEndpointResourceId https://managedhsm.azure.net
ContainerRegistryEndpointResourceId https://management.azure.com
AzureAppConfigurationEndpointResourceId https://azconfig.io
AzurePurviewEndpointSuffix purview.azure.net
ManagedHsmServiceEndpointSuffix managedhsm.azure.net
MicrosoftGraphUrl https://graph.microsoft.com
AzureAttestationServiceEndpointSuffix attest.azure.net
AzureSynapseAnalyticsEndpointSuffix dev.azuresynapse.net
AzureAnalysisServicesEndpointSuffix asazure.windows.net
AzureSynapseAnalyticsEndpointResourceId https://dev.azuresynapse.net
OperationalInsightsEndpointResourceId https://api.loganalytics.io
AnalysisServicesEndpointResourceId https://region.asazure.windows.net
AzurePurviewEndpointResourceId https://purview.azure.net
AzureAppConfigurationEndpointSuffix azconfig.io
AzureAttestationServiceEndpointResourceId https://attest.azure.net
MicrosoftGraphEndpointResourceId https://graph.microsoft.com/
OperationalInsightsEndpoint https://api.loganalytics.io/v1
```
If I want to change the value of ManagedHsmServiceEndpointSuffix, the only thing I can do is modifying AzureRmContext.json manually.
### Proposed implementation details (optional)
Support `Set-AzEnvironment -ExtendedProperty -Key xxx -Value xxx`
Contributor guide
Research direction
Start by locating the Set-AzEnvironment implementation and the handling of Environment.ExtendedProperties, then inspect how values are persisted in AzureRmContext.json. Done means Set-AzEnvironment accepts an extended-property key and value and updates the corresponding environment property without manual file editing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- cli, cloud
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100