Skip to content

Commit

Permalink
adding prop and condition for OperationalInsightsEndpointResourceId (#…
Browse files Browse the repository at this point in the history
…414)

* adding prop and condition for OperationalInsightsEndpointResourceId

* removing unnecessary conditional

* removing redundant definition

* simplifying endpoint value

---------

Co-authored-by: Ryan Pethel 🛴 <[email protected]>
  • Loading branch information
andrewpethel and Ryan Pethel 🛴 authored May 9, 2024
1 parent 4a09381 commit baa2eed
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Authentication.Abstractions/AzureEnvironment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,12 @@ private static AzureEnvironment MapArmToAzureEnvironment(ArmMetadata armMetadata
}
}

if (!string.IsNullOrEmpty(armMetadata.LogAnalyticsResourceId))
{
azureEnvironment.SetProperty(ExtendedEndpoint.OperationalInsightsEndpointResourceId, armMetadata.LogAnalyticsResourceId);
azureEnvironment.SetProperty(ExtendedEndpoint.OperationalInsightsEndpoint, $"{armMetadata.LogAnalyticsResourceId}/v1");
}

//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 @@ -458,7 +464,7 @@ public AzureEnvironment(IAzureEnvironment other)
/// The domain name suffix for Azure Container Registry
/// </summary>
public string ContainerRegistryEndpointSuffix { get; set; }

/// <summary>
/// The set of Azure Version Profiles supported in this environment
/// </summary>
Expand Down

0 comments on commit baa2eed

Please sign in to comment.