claranet / terraform-provider-zabbix

Terraform provider for Zabbix.
MIT License
29 stars 18 forks source link

zabbix_template fails with "unexpected parameter "name"." #53

Open rkarpuzov opened 2 years ago

rkarpuzov commented 2 years ago

When I try to create template fails with

│ Error: -32602 (Invalid params.): Invalid parameter "/1/groups/1": unexpected parameter "name". │ │ with zabbix_template.log_template, │ on main.tf line 24, in resource "zabbix_template" "log_template": │ 24: resource "zabbix_template" "log_template" {

My code:

resource "zabbix_host_group" "log_group" {
  name = "Log Monitoring group"
}

resource "zabbix_template" "log_template" {
  host        = "Template Logs"
  description = "Template log Log monitoring. Local Log files."
  groups      = [zabbix_host_group.log_group.name]
}

Terraform v1.3.4 on linux_amd64

tested aso with 0.3.0 and TF 1.0.x - there is no difference Reference documentation: https://www.zabbix.com/documentation/6.0/en/manual/config/items/itemtypes/log_items

pdecat commented 2 years ago

Another case of API breaking changes from 5.4 to 6.0:

ZBXNEXT-6867 template.create, template.update, template.delete, template.massadd, template.massupdate, template.massremove: added strict validation of the methods parameters. https://www.zabbix.com/documentation/6.0/en/manual/api/changes_5.4_-_6.0#template

rkarpuzov commented 2 years ago

Thank you for your update! I see few answers in the provided link - issue with host_group, but I found workaround for my case, and issue with import of supported item in 5.4