-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Add App Config to Azure Environment #29393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -191,6 +191,14 @@ public string DataLakeAudience | |
| HelpMessage = "The resource identifier of the Azure Attestation service that is the recipient of the requested token.")] | ||
| public string AzureAttestationServiceEndpointResourceId { get; set; } | ||
|
|
||
| [Parameter(ParameterSetName = EnvironmentPropertiesParameterSet, Mandatory = false, ValueFromPipelineByPropertyName = true, | ||
| HelpMessage = "Dns suffix of Azure App Configuration.")] | ||
| public string AzureAppConfigurationEndpointSuffix { get; set; } | ||
|
|
||
| [Parameter(ParameterSetName = EnvironmentPropertiesParameterSet, Mandatory = false, ValueFromPipelineByPropertyName = true, | ||
| HelpMessage = "The resource identifier of the Azure App Configuration service that is the recipient of the requested token.")] | ||
| public string AzureAppConfigurationEndpointResourceId { get; set; } | ||
|
|
||
| [Parameter(ParameterSetName = EnvironmentPropertiesParameterSet, Mandatory = false, ValueFromPipelineByPropertyName = true, | ||
| HelpMessage = "Dns suffix of Azure Synapse Analytics.")] | ||
| [Parameter(ParameterSetName = MetadataParameterSet, Mandatory = false, ValueFromPipelineByPropertyName = true, | ||
|
|
@@ -387,6 +395,10 @@ public override void ExecuteCmdlet() | |
| nameof(AzureAttestationServiceEndpointSuffix)); | ||
| SetEndpointIfBound(newEnvironment, AzureEnvironment.ExtendedEndpoint.AzureAttestationServiceEndpointResourceId, | ||
| nameof(AzureAttestationServiceEndpointResourceId)); | ||
| SetEndpointIfBound(newEnvironment, AzureEnvironment.ExtendedEndpoint.AzureAppConfigurationEndpointSuffix, | ||
| nameof(AzureAppConfigurationEndpointSuffix)); | ||
| SetEndpointIfBound(newEnvironment, AzureEnvironment.ExtendedEndpoint.AzureAppConfigurationEndpointResourceId, | ||
| nameof(AzureAppConfigurationEndpointResourceId)); | ||
|
Comment on lines
+398
to
+401
|
||
| SetEndpointIfBound(newEnvironment, AzureEnvironment.ExtendedEndpoint.AzureSynapseAnalyticsEndpointSuffix, | ||
| nameof(AzureSynapseAnalyticsEndpointSuffix)); | ||
| SetEndpointIfBound(newEnvironment, AzureEnvironment.ExtendedEndpoint.AzureSynapseAnalyticsEndpointResourceId, | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -174,6 +174,14 @@ public string DataLakeAudience | |||||||||||||||||||||||||||||||||
| HelpMessage = "The resource identifier of the Azure Attestation service that is the recipient of the requested token.")] | ||||||||||||||||||||||||||||||||||
| public string AzureAttestationServiceEndpointResourceId { get; set; } | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, | ||||||||||||||||||||||||||||||||||
| HelpMessage = "Dns suffix of Azure App Configuration.")] | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
| HelpMessage = "Dns suffix of Azure App Configuration.")] | |
| HelpMessage = "DNS suffix of Azure App Configuration.")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't be including endpoint suffix. It's subject to change, and clients should query endpoint off an app configuration resource rather than build endpoints.
Copilot
AI
Apr 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same issue as the suffix parameter: -AzureAppConfigurationEndpointResourceId can be specified with -ARMEndpoint, but the metadata branch doesn’t persist it, so it will be ignored.
| [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, | |
| [Parameter(ParameterSetName = EnvironmentPropertiesParameterSet, Mandatory = false, ValueFromPipelineByPropertyName = true, |
Copilot
AI
Apr 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This new parameter can be bound while using the ARMEndpoint parameter set (it isn’t restricted to Name), but the ARMEndpoint branch of ExecuteCmdlet() doesn’t apply it to the environment being created/updated. Either apply it in the metadata branch or restrict it to the Name parameter set to avoid misleading behavior.
| [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, | |
| HelpMessage = "Dns suffix of Azure App Configuration.")] | |
| public string AzureAppConfigurationEndpointSuffix { get; set; } | |
| [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, | |
| HelpMessage = "The resource identifier of the Azure App Configuration service that is the recipient of the requested token.")] | |
| [Parameter(ParameterSetName = EnvironmentPropertiesParameterSet, Mandatory = false, ValueFromPipelineByPropertyName = true, | |
| HelpMessage = "Dns suffix of Azure App Configuration.")] | |
| [Parameter(ParameterSetName = MetadataParameterSet, Mandatory = false, ValueFromPipelineByPropertyName = true, | |
| HelpMessage = "Dns suffix of Azure App Configuration.")] | |
| public string AzureAppConfigurationEndpointSuffix { get; set; } | |
| [Parameter(ParameterSetName = EnvironmentPropertiesParameterSet, Mandatory = false, ValueFromPipelineByPropertyName = true, | |
| HelpMessage = "The resource identifier of the Azure App Configuration service that is the recipient of the requested token.")] | |
| [Parameter(ParameterSetName = MetadataParameterSet, Mandatory = false, ValueFromPipelineByPropertyName = true, | |
| HelpMessage = "The resource identifier of the Azure App Configuration service that is the recipient of the requested token.")] |
Copilot
AI
Apr 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test coverage: there are existing cmdlet tests asserting endpoint parameters are saved for Add/Set-AzEnvironment, but none cover the new App Configuration suffix/resourceId. Add/extend a test to verify these two endpoints are persisted when provided.
Copilot
AI
Apr 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cmdlet now supports setting App Configuration endpoints. Add/extend a test to assert that Set-AzEnvironment persists AzureAppConfigurationEndpointSuffix and AzureAppConfigurationEndpointResourceId onto the environment object (similar to existing endpoint-property assertions), so regressions in parameter binding or endpoint key wiring are caught.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -119,6 +119,9 @@ public PSAzureEnvironment(PSObject other) | |
| AzureAttestationServiceEndpointResourceId = | ||
| other.GetProperty<string>(nameof(AzureAttestationServiceEndpointResourceId)); | ||
| AzureAttestationServiceEndpointSuffix = other.GetProperty<string>(nameof(AzureAttestationServiceEndpointSuffix)); | ||
| AzureAppConfigurationEndpointResourceId = | ||
| other.GetProperty<string>(nameof(AzureAppConfigurationEndpointResourceId)); | ||
| AzureAppConfigurationEndpointSuffix = other.GetProperty<string>(nameof(AzureAppConfigurationEndpointSuffix)); | ||
| AzureSynapseAnalyticsEndpointResourceId = | ||
| other.GetProperty<string>(nameof(AzureSynapseAnalyticsEndpointResourceId)); | ||
| AzureSynapseAnalyticsEndpointSuffix = other.GetProperty<string>(nameof(AzureSynapseAnalyticsEndpointSuffix)); | ||
|
|
@@ -342,6 +345,36 @@ public string AzureAttestationServiceEndpointResourceId | |
| } | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// The domain name suffix for Azure App Configuration | ||
| /// </summary> | ||
| public string AzureAppConfigurationEndpointSuffix | ||
| { | ||
| get | ||
| { | ||
| return this.GetEndpoint(AzureEnvironment.ExtendedEndpoint.AzureAppConfigurationEndpointSuffix); | ||
| } | ||
| set | ||
| { | ||
| this.SetEndpoint(AzureEnvironment.ExtendedEndpoint.AzureAppConfigurationEndpointSuffix, value); | ||
| } | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Gets or sets the resource Id to use for contacting the Azure App Configuration endpoint | ||
| /// </summary> | ||
| public string AzureAppConfigurationEndpointResourceId | ||
| { | ||
| get | ||
| { | ||
| return this.GetEndpoint(AzureEnvironment.ExtendedEndpoint.AzureAppConfigurationEndpointResourceId); | ||
| } | ||
| set | ||
| { | ||
| this.SetEndpoint(AzureEnvironment.ExtendedEndpoint.AzureAppConfigurationEndpointResourceId, value); | ||
| } | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// The domain name suffix for Azure Synapse Analytics | ||
| /// </summary> | ||
|
|
@@ -414,6 +447,8 @@ public override bool Equals(object obj) | |
| && AzureOperationalInsightsEndpoint == other.AzureOperationalInsightsEndpoint | ||
| && AzureAttestationServiceEndpointResourceId == other.AzureAttestationServiceEndpointResourceId | ||
| && AzureAttestationServiceEndpointSuffix == other.AzureAttestationServiceEndpointSuffix | ||
| && AzureAppConfigurationEndpointResourceId == other.AzureAppConfigurationEndpointResourceId | ||
| && AzureAppConfigurationEndpointSuffix == other.AzureAppConfigurationEndpointSuffix | ||
| && ContainerRegistryEndpointSuffix == other.ContainerRegistryEndpointSuffix; | ||
|
Comment on lines
448
to
452
|
||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the standard capitalization "DNS" in help text (currently "Dns").