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

Log Analytic Workspace in different subscription #14

Open
petr-stupka opened this issue Sep 8, 2023 · 0 comments
Open

Log Analytic Workspace in different subscription #14

petr-stupka opened this issue Sep 8, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@petr-stupka
Copy link
Contributor

If Log Analytic Workspace is in different subscription, the data source can not read the resource (can only read resource in the same subscription where the deployment is happening)

# Get exisiting Log Analytics Workspace if law_resource_group_name is defined
data "azurerm_log_analytics_workspace" "existing-law" {
  count               = var.law_resource_group_name != null ? 1 : 0
  name                = var.law_name
  resource_group_name = var.law_resource_group_name
}

Options, either use provider block in the data resource specifying the subscriptionId or use direct Log Analytic Workspace reference (id, workspaceId, sharedKey)

@petr-stupka petr-stupka added the enhancement New feature or request label Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant