hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.61k stars 4.65k forks source link

azurerm_log_analytics_workspace #18141

Open christiansalathe-art opened 2 years ago

christiansalathe-art commented 2 years ago

Is there an existing issue for this?

Community Note

Searching for terraform way to link a Log Analytics Workspace to AMPLS (Azue Monitor Private Ling Scope).

Description

I don't found a way to link a Log Analytics Workspace to AMPLS (Azue Monitor Private Ling Scope). Would be a option in der azurerm_log_analytics_worspace like "privateLinkScopedResource"

New or Affected Resource(s)/Data Source(s)

azurerm_log_analytics_workspace

Potential Terraform Configuration

privateLinkScopedResources
resourceId = ampls-id
scopeId = xxxxxx

References

No response

t3mi commented 2 years ago

@christiansalathe-art the following resource azurerm_monitor_private_link_scoped_service could be used to link log analytics to the AMPLS.

summahto commented 2 months ago

@christiansalathe-art the following resource azurerm_monitor_private_link_scoped_service could be used to link log analytics to the AMPLS.

This means we have to create all the instances of Log analytics workspaces and Application Insights before creating AMPLS and then link them. But, when you think architecturally, AMPLS is a global configuration and there will be most probably a single instance of it in a single subscription. But there can be many instances of Log analytics workspaces and Application Insights pertaining to different APIs/services.

Let's take a scenario, AMPLS (1 instance ) was already implemented in a project and a new instance Log analytics workspaces was added. Shouldn't there be an option to connect these instances with AMPLS via Log Analytics Workspace itself (which we have in Azure console but not in terraform), rather than redeploying AMPLS again to connect both of them ?

Same case applies to Application Insights as well.