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

Support for default ingestion settings properties in azurerm_monitor_workspace (resource and data source) #24151

Closed
1 task done
djryanj opened this issue Dec 7, 2023 · 1 comment · Fixed by #24153
Closed
1 task done

Comments

@djryanj
Copy link
Contributor

djryanj commented Dec 7, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment and review the contribution guide to help.

Description

Creating a new azurerm_monitor_workspace (or referencing an existing one via a data source of the same name) creates managed, default ingestion settings, one default data collection rule and one default data collection endpoint, both of which are in Microsoft-managed resource groups (e.g., MA_amwname_canadacentral_managed). While it's probably possible to guess the name of this resource group and then use e.g., a data source of type azurerm_monitor_data_collection_endpoint or azurerm_monitor_data_collection_rule to perform further actions on the endpoints (such as apply RBAC rules), the API does actually return the default ingestion data, it's just not exposed via these resources.

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

azurerm_monitor_workspace

Potential Terraform Configuration

data "azurerm_client_config" "example" {
}

resource "azurerm_resource_group" "example" {
  name     = "example-resources"
  location = "West Europe"
}

resource "azurerm_monitor_workspace" "example" {
  name                = "example-mamw"
  resource_group_name = azurerm_resource_group.example.name
  location            = "West Europe"
  tags = {
    key = "value"
  }
}

resource "azurerm_role_assignment" "workspace_monitoring_metrics_publisher" {
  scope                = azurerm_monitor_workspace.example.default_data_collection_endpoint_id
  role_definition_name = "Monitoring Metrics Publisher"
  principal_id         = data.azurerm_client_config.example.object_id
}

References

Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.