Skip to content
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

adding prop and condition for OperationalInsightsEndpointResourceId #414

Merged
merged 8 commits into from
May 9, 2024
16 changes: 16 additions & 0 deletions src/Authentication.Abstractions/AzureEnvironment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,17 @@ private static AzureEnvironment MapArmToAzureEnvironment(ArmMetadata armMetadata
}
}

if (!string.IsNullOrEmpty(armMetadata.LogAnalyticsResourceId))
{
string api_version = "v1";
andrewpethel marked this conversation as resolved.
Show resolved Hide resolved
var logAnalyticsEndpoint = armMetadata.LogAnalyticsResourceId + '/' + api_version;
andrewpethel marked this conversation as resolved.
Show resolved Hide resolved
azureEnvironment.SetProperty(ExtendedEndpoint.OperationalInsightsEndpointResourceId, armMetadata.LogAnalyticsResourceId);
if (!string.IsNullOrEmpty(logAnalyticsEndpoint))
andrewpethel marked this conversation as resolved.
Show resolved Hide resolved
{
azureEnvironment.SetProperty(ExtendedEndpoint.OperationalInsightsEndpoint, logAnalyticsEndpoint);
}
}

//ManagedHsmServiceEndpointSuffix currently uses Built-in endpoint.
//In new ArmMedata, ManagedHsmServiceEndpointSuffix is provided as so 'MhsmDns'.
//But it doesn't' make sense to just refresh ManagedHsmServiceEndpointSuffix from ARM without AzureManagedHsmServiceEndpointResourceId.
Expand Down Expand Up @@ -459,6 +470,11 @@ public AzureEnvironment(IAzureEnvironment other)
/// </summary>
public string ContainerRegistryEndpointSuffix { get; set; }

/// <summary>
/// The token audience required for communicating with the Log Analytics service in this enviornment
/// </summary>
public string OperationalInsightsEndpointResourceId { get; set; }
andrewpethel marked this conversation as resolved.
Show resolved Hide resolved

andrewpethel marked this conversation as resolved.
Show resolved Hide resolved
/// <summary>
/// The set of Azure Version Profiles supported in this environment
/// </summary>
Expand Down