Hello friends, my Terraform scripts with the claranet/zabbix provider was working perfectly with Version 3, but after migrating Zabbix to version 6.0.3 the problems started.
I can even create a host Group and a Host, but at the time of destroying I get the error message:
zabbix_host.zabbix1: Destroying… [id=10520]
│ Error: -32602 (Invalid params.): Invalid parameter “/1”: a number is expected.
Even changing providers, I all get the same error, I also tested on another Zabbix server from another client in the same version 6.0.3 and I get the same error, that is, the error is exactly with this version of Zabbix.
Is there any way I can get this fixed?
Thanks
Below my test code:
terraform {
required_providers {
zabbix = {
source = “claranet/zabbix”
version = “0.3.0”
}
}
}
provider “zabbix” {
user = “Admin”
password = “PASSWORD”
server_url = “http://XX.XXX.XX.XX/zabbix/api_jsonrpc.php”
}
resource “zabbix_host” “zabbix1” {
host = “127.0.0.1”
name = “the best name”
interfaces {
ip = “127.0.0.1”
main = true
}
groups = [“Linux servers”, “${zabbix_host_group.zabbix.name}”]
templates = [“Aranet Cloud”]
}
resource “zabbix_host_group” “zabbix” {
name = “something”
}