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

Monitor Diagnostic Setting: invalid or unknown key: event_hub_authorization_rule_id #2571

Closed
TheFlyingArcher opened this issue Dec 21, 2018 · 4 comments
Assignees
Milestone

Comments

@TheFlyingArcher
Copy link

I did see issues #626 and #1020, but I think this is a bit of a new one.

The documentation shows that one of the parameters is event_hub_authorization_rule_id in the monitor diagnostic setting resource, however, I'm getting this error returned:
Error: module.example_kv_diagnostic.azurerm_monitor_diagnostic_setting.azure_mds_log: : invalid or unknown key: event_hub_authorization_rule_id

This would be my example code

resource "azurerm_monitor_diagnostic_setting" "azure_mds_log" {
  count              = "${length(var.log_category) > 0 && length(var.metric_category) < 1 ? 1 : 0}"
  name               = "${module.namespace.name}"
  target_resource_id = "${var.monitored_resource_id}"
  storage_account_id = "${var.log_storage_account}"

  event_hub_name                  = "${var.event_hub_name}"
  event_hub_authorization_rule_id = "${var.event_hub_auth_rule_id}"
  log_analytics_workspace_id      = "${var.log_analytics_workspace}"

  log {
    category = "${var.log_category}"
    enabled  = true

    retention_policy {
      days    = "${var.log_retention_days}"
      enabled = true
    }
  }
}

Doing the standard init & apply would reproduce the error.

@tombuildsstuff
Copy link
Contributor

hey @bcline760

Thanks for opening this issue :)

So that we could take a look into this would it be possible to know which version of Terraform and the Azure Provider you're running?

Thanks!

@TheFlyingArcher
Copy link
Author

Terraform v0.11.10

  • provider.azurerm v1.20.0
  • provider.null v1.0.0
  • provider.random v2.0.0

Your version of Terraform is out of date! The latest version
is 0.11.11. You can update by downloading from www.terraform.io/downloads.html

@ghost ghost removed the waiting-response label Dec 26, 2018
@tombuildsstuff
Copy link
Contributor

hey @bcline760

Thanks for confirming that / apologies for the delayed response here.

Taking a look into this this appears to be a bug in the documentation - the fields are eventhub_authorization_rule_id and eventhub_name (without an underscore between event and hub) - which got renamed during the PR which added support for this but missed in the documentation. I'll open a PR to fix this shortly - but would you be able to take a look and see if using the names without the underscores works for you?

Thanks!

@ghost
Copy link

ghost commented Mar 5, 2019

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants