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

azurerm_log_analytics_data_export_rule doesn't accept Event Hub Namespace #19861

Closed
1 task done
andrewmcharg opened this issue Jan 4, 2023 · 3 comments · Fixed by #19868
Closed
1 task done

azurerm_log_analytics_data_export_rule doesn't accept Event Hub Namespace #19861

andrewmcharg opened this issue Jan 4, 2023 · 3 comments · Fixed by #19868
Labels
Milestone

Comments

@andrewmcharg
Copy link

andrewmcharg commented Jan 4, 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

Terraform Version

1.1.9

AzureRM Provider Version

3.34.0

Affected Resource(s)/Data Source(s)

azurerm_log_analytics_data_export_rule

Terraform Configuration Files

resource "azurerm_resource_group" "example" {
  name     = "example-rg"
  location = "UK West"
}

resource "azurerm_log_analytics_workspace" "main" {
  name                = "acctest-01"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name
  sku                 = "PerGB2018"
  retention_in_days   = 30
}

resource "azurerm_eventhub_namespace" "export-namespace" {
  name                = "loganalytics-to-adx"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name
  sku                 = "Standard"
  capacity            = 2
}

resource "azurerm_log_analytics_data_export_rule" "example" {
  name                    = "SampleDataExportRule"
  resource_group_name     = azurerm_resource_group.example.name
  workspace_resource_id   = azurerm_log_analytics_workspace.main.id
  destination_resource_id = azurerm_eventhub_namespace.export-namespace.id
  table_names             = ["Heartbeat", "Syslog", "WindowsEvent"]
  enabled                 = true
}

Debug Output/Panic Output

Error: parsing destination eventhub id error: parsing "/subscriptions/31aae88f-52ea-4de0-873e-eacf0a2b93d0/resourceGroups/example-rg/providers/Microsoft.EventHub/namespaces/example-ehns": expected 10 segments within the Resource ID but got 8 for "/subscriptions/31aae88f-52ea-4de0-873e-eacf0a2b93d0/resourceGroups/example-rg/providers/Microsoft.EventHub/namespaces/example-ehns "

 

  with azurerm_log_analytics_data_export_rule.rule1,

  on main.tf line 94, in resource "azurerm_log_analytics_data_export_rule" "rule1":

  94: resource "azurerm_log_analytics_data_export_rule" "rule1" {

 

error: An error has occurred

Expected Behaviour

Data Export Rule created with multiple tables each pointing to an Event Hub created within the Namespace as described in docs.

Actual Behaviour

Apply fails with:

Error: parsing destination eventhub id error: parsing "/subscriptions/31aae88f-52ea-4de0-873e-eacf0a2b93d0/resourceGroups/example-rg/providers/Microsoft.EventHub/namespaces/example-ehns": expected 10 segments within the Resource ID but got 8 for "/subscriptions/31aae88f-52ea-4de0-873e-eacf0a2b93d0/resourceGroups/example-rg/providers/Microsoft.EventHub/namespaces/example-ehns "

 

  with azurerm_log_analytics_data_export_rule.rule1,

  on [main.tf] line 94, in resource "azurerm_log_analytics_data_export_rule" "rule1":

  94: resource "azurerm_log_analytics_data_export_rule" "rule1" {

 

error: An error has occurred

Steps to Reproduce

  1. terraform apply

Important Factoids

No response

References

No response

@sinbai
Copy link
Contributor

sinbai commented Jan 5, 2023

@andrewmcharg thanks for opening this issue. PR has been submitted to fix this issue. Could you track it for more updates?

@github-actions github-actions bot added this to the v3.39.0 milestone Jan 11, 2023
@github-actions
Copy link

This functionality has been released in v3.39.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
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 Feb 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
3 participants