diff --git a/src/Accounts/Accounts.Test/EnvironmentCmdletTestsExtension.cs b/src/Accounts/Accounts.Test/EnvironmentCmdletTestsExtension.cs index 1be5e1d42c90..9612416204c1 100644 --- a/src/Accounts/Accounts.Test/EnvironmentCmdletTestsExtension.cs +++ b/src/Accounts/Accounts.Test/EnvironmentCmdletTestsExtension.cs @@ -132,6 +132,8 @@ public static PSAzureEnvironment GetAzureChinaCloudEndpoints() env.SetProperty("ManagedHsmServiceEndpointSuffix", "managedhsm.azure.cn"); env.SetProperty("MicrosoftGraphEndpointResourceId", "https://microsoftgraph.chinacloudapi.cn/"); env.SetProperty("MicrosoftGraphUrl", "https://microsoftgraph.chinacloudapi.cn"); + env.SetProperty("AzureAppConfigurationEndpointSuffix", "azconfig.azure.cn"); + env.SetProperty("AzureAppConfigurationEndpointResourceId", "https://azconfig.azure.cn"); env.SetProperty("ContainerRegistryEndpointResourceId", "https://management.chinacloudapi.cn"); return env; } @@ -184,6 +186,8 @@ public static PSAzureEnvironment GetAzureUSGovernmentEndpoints() env.SetProperty("ManagedHsmServiceEndpointSuffix", "managedhsm.usgovcloudapi.net"); env.SetProperty("MicrosoftGraphEndpointResourceId", "https://graph.microsoft.us/"); env.SetProperty("MicrosoftGraphUrl", "https://graph.microsoft.us"); + env.SetProperty("AzureAppConfigurationEndpointSuffix", "azconfig.azure.us"); + env.SetProperty("AzureAppConfigurationEndpointResourceId", "https://azconfig.azure.us"); env.SetProperty("ContainerRegistryEndpointResourceId", "https://management.usgovcloudapi.net"); return env; } diff --git a/src/Accounts/Accounts/ChangeLog.md b/src/Accounts/Accounts/ChangeLog.md index 9a6919b9fdb3..b7904cc06f1a 100644 --- a/src/Accounts/Accounts/ChangeLog.md +++ b/src/Accounts/Accounts/ChangeLog.md @@ -19,6 +19,8 @@ --> ## Upcoming Release +* Added `AzureAppConfigurationEndpointSuffix` and `AzureAppConfigurationEndpointResourceId` parameters to `Add-AzEnvironment` and `Set-AzEnvironment` + - Users can now configure Azure App Configuration endpoints when adding or updating custom environments ## Version 5.3.4 * Improved SSH certificate authentication for Az SSH cmdlets across all Azure clouds. diff --git a/src/Accounts/Accounts/Environment/AddAzureRMEnvironment.cs b/src/Accounts/Accounts/Environment/AddAzureRMEnvironment.cs index c24359a22a55..711e0e3a2dd4 100644 --- a/src/Accounts/Accounts/Environment/AddAzureRMEnvironment.cs +++ b/src/Accounts/Accounts/Environment/AddAzureRMEnvironment.cs @@ -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)); SetEndpointIfBound(newEnvironment, AzureEnvironment.ExtendedEndpoint.AzureSynapseAnalyticsEndpointSuffix, nameof(AzureSynapseAnalyticsEndpointSuffix)); SetEndpointIfBound(newEnvironment, AzureEnvironment.ExtendedEndpoint.AzureSynapseAnalyticsEndpointResourceId, diff --git a/src/Accounts/Accounts/Environment/SetAzureRMEnvironment.cs b/src/Accounts/Accounts/Environment/SetAzureRMEnvironment.cs index 1dfff7384f01..f29d6c164a10 100644 --- a/src/Accounts/Accounts/Environment/SetAzureRMEnvironment.cs +++ b/src/Accounts/Accounts/Environment/SetAzureRMEnvironment.cs @@ -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.")] + 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.")] + public string AzureAppConfigurationEndpointResourceId { get; set; } + [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Dns suffix of Azure Synapse Analytics.")] public string AzureSynapseAnalyticsEndpointSuffix { get; set; } @@ -358,6 +366,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)); SetEndpointIfBound(newEnvironment, AzureEnvironment.ExtendedEndpoint.AzureSynapseAnalyticsEndpointSuffix, nameof(AzureSynapseAnalyticsEndpointSuffix)); SetEndpointIfBound(newEnvironment, AzureEnvironment.Endpoint.ContainerRegistryEndpointSuffix, diff --git a/src/Accounts/Authentication.ResourceManager/Models/PSAzureEnvironment.cs b/src/Accounts/Authentication.ResourceManager/Models/PSAzureEnvironment.cs index b239df2bd1c5..c08bfbdcabb8 100644 --- a/src/Accounts/Authentication.ResourceManager/Models/PSAzureEnvironment.cs +++ b/src/Accounts/Authentication.ResourceManager/Models/PSAzureEnvironment.cs @@ -119,6 +119,9 @@ public PSAzureEnvironment(PSObject other) AzureAttestationServiceEndpointResourceId = other.GetProperty(nameof(AzureAttestationServiceEndpointResourceId)); AzureAttestationServiceEndpointSuffix = other.GetProperty(nameof(AzureAttestationServiceEndpointSuffix)); + AzureAppConfigurationEndpointResourceId = + other.GetProperty(nameof(AzureAppConfigurationEndpointResourceId)); + AzureAppConfigurationEndpointSuffix = other.GetProperty(nameof(AzureAppConfigurationEndpointSuffix)); AzureSynapseAnalyticsEndpointResourceId = other.GetProperty(nameof(AzureSynapseAnalyticsEndpointResourceId)); AzureSynapseAnalyticsEndpointSuffix = other.GetProperty(nameof(AzureSynapseAnalyticsEndpointSuffix)); @@ -342,6 +345,36 @@ public string AzureAttestationServiceEndpointResourceId } } + /// + /// The domain name suffix for Azure App Configuration + /// + public string AzureAppConfigurationEndpointSuffix + { + get + { + return this.GetEndpoint(AzureEnvironment.ExtendedEndpoint.AzureAppConfigurationEndpointSuffix); + } + set + { + this.SetEndpoint(AzureEnvironment.ExtendedEndpoint.AzureAppConfigurationEndpointSuffix, value); + } + } + + /// + /// Gets or sets the resource Id to use for contacting the Azure App Configuration endpoint + /// + public string AzureAppConfigurationEndpointResourceId + { + get + { + return this.GetEndpoint(AzureEnvironment.ExtendedEndpoint.AzureAppConfigurationEndpointResourceId); + } + set + { + this.SetEndpoint(AzureEnvironment.ExtendedEndpoint.AzureAppConfigurationEndpointResourceId, value); + } + } + /// /// The domain name suffix for Azure Synapse Analytics /// @@ -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; }