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

Feature: Support netbox_event_rule for Netbox 4.1.7 #663

Closed
alexandrud opened this issue Dec 10, 2024 · 1 comment
Closed

Feature: Support netbox_event_rule for Netbox 4.1.7 #663

alexandrud opened this issue Dec 10, 2024 · 1 comment

Comments

@alexandrud
Copy link

Netbox version

v4.1.7
The provider does not support 4.1.x. This is an issue to add on the roadmap for supporting it.

Terraform Version

tofu --version
OpenTofu v1.8.2
on linux_amd64

  • provider registry.opentofu.org/e-breuninger/netbox v3.9.2

Affected Resource(s)

netbox_event_rule

Terraform Configuration Files

resource "netbox_event_rule" "esxi_system_update" {
  name          = "esxi-system-update"
  description   = "[TF] ESXi system update rule"
  content_types = ["dcim.device"]
  conditions = jsonencode(
    {
      "attr" : "platform.id",
      "value" : tonumber(netbox_platform.this["VMware ESXi"].id)
    }
  )
  action_type       = "webhook"
  action_object_id  = netbox_webhook.esxi_system_update.id
  trigger_on_update = true
  trigger_on_create = true
}

Debug Output

│ Error: [PUT /extras/event-rules/{id}/][400] extras_event_rules_update default {"event_types":["This field is required."]}

│ with netbox_event_rule.esxi_system_update,
│ on webhooks.tf line 102, in resource "netbox_event_rule" "esxi_system_update":
│ 102: resource "netbox_event_rule" "esxi_system_update" {

Expected Behavior

The event rule should be updated.

Actual Behavior

Update fails with the error above.

Steps to Reproduce

Install netbox 4.1.7.
Try to create a netbox_event_rule resource.

Important Factoids

The payload format for netbox_event_rule has changed from 4.0.x to 4.1.x.

References

https://github.com/netbox-community/netbox/releases/tag/v4.1.0

@fbreckle
Copy link
Collaborator

fbreckle commented Jan 9, 2025

This will be fixed in #642

@fbreckle fbreckle closed this as completed Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants