Hi,
I use this Zabbix provider (Terraform Registry)
I have this terraform code:
...
resource "zabbix_item_snmp" "snmp_proc_myprocess_item" {
hostid = data.zabbix_template.template.id
key = "snmp_proc_myprocess"
name = "myprocess Process Count"
valuetype = "unsigned"
delay = "1m"
history = "90d"
snmp_oid = "UCD-SNMP-MIB::prCount[\"index\", \"UCD-SNMP-MIB::prNames\", \"myprocess\"]"
depends_on = [data.zabbix_template.template]
}
resource "zabbix_graph" "graph_proc_myprocess" {
name = "myprocess Process Count"
width = "900"
height = "200"
item {
color = "FF0000"
itemid = "${zabbix_item_snmp.snmp_proc_myprocess_item.id}"
}
}
When I run the first time, I don’t receive error.
If I try to re-run, I receive this error:
Error: -32602 (Invalid params.): No permissions to referred object or it does not exist!
│
│ with module.myprocess-servers_triggers.zabbix_graph.graph_proc_myprocess,
│ on myprocess-servers-triggers/triggers.tf line 254, in resource “zabbix_graph” “graph_proc_myprocess”:
│ 254: resource “zabbix_graph” “graph_proc_myprocess” {
Where am I wrong?