Skip to content

Commit baa2eed

Browse files
andrewpethelRyan Pethel 🛴
andauthored
adding prop and condition for OperationalInsightsEndpointResourceId (#414)
* adding prop and condition for OperationalInsightsEndpointResourceId * removing unnecessary conditional * removing redundant definition * simplifying endpoint value --------- Co-authored-by: Ryan Pethel 🛴 <[email protected]>
1 parent 4a09381 commit baa2eed

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Authentication.Abstractions/AzureEnvironment.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,12 @@ private static AzureEnvironment MapArmToAzureEnvironment(ArmMetadata armMetadata
231231
}
232232
}
233233

234+
if (!string.IsNullOrEmpty(armMetadata.LogAnalyticsResourceId))
235+
{
236+
azureEnvironment.SetProperty(ExtendedEndpoint.OperationalInsightsEndpointResourceId, armMetadata.LogAnalyticsResourceId);
237+
azureEnvironment.SetProperty(ExtendedEndpoint.OperationalInsightsEndpoint, $"{armMetadata.LogAnalyticsResourceId}/v1");
238+
}
239+
234240
//ManagedHsmServiceEndpointSuffix currently uses Built-in endpoint.
235241
//In new ArmMedata, ManagedHsmServiceEndpointSuffix is provided as so 'MhsmDns'.
236242
//But it doesn't' make sense to just refresh ManagedHsmServiceEndpointSuffix from ARM without AzureManagedHsmServiceEndpointResourceId.
@@ -458,7 +464,7 @@ public AzureEnvironment(IAzureEnvironment other)
458464
/// The domain name suffix for Azure Container Registry
459465
/// </summary>
460466
public string ContainerRegistryEndpointSuffix { get; set; }
461-
467+
462468
/// <summary>
463469
/// The set of Azure Version Profiles supported in this environment
464470
/// </summary>

0 commit comments

Comments
 (0)