Open Jeka-Dem opened 4 years ago
Terraform v0.12.12 zabbix_provider - 0.0.4 Issue: during terraform plan, get error: Error: Unsupported argument on ../../modules/vm_base/main.tf line 125, in resource "zabbix_host" "this": 125: interfaces
Terraform v0.12.12
terraform plan
Error: Unsupported argument
on ../../modules/vm_base/main.tf line 125, in resource "zabbix_host" "this": 125: interfaces
An argument named "interfaces" is not expected here. Did you mean to define a block of type "interfaces"?
main.tf: resource "zabbix_host" "this" { count = "${var.vm_count}" host = "${element(vsphere_virtual_machine.this.*.name, count.index)}" interfaces = [{ main = true }] groups = [ "${zabbix_host_group.this}"] templates = ["Template OS Linux v2"] depends_on = [vsphere_virtual_machine.this] }
resource "zabbix_host" "this" { count = "${var.vm_count}" host = "${element(vsphere_virtual_machine.this.*.name, count.index)}" interfaces = [{ main = true }] groups = [ "${zabbix_host_group.this}"] templates = ["Template OS Linux v2"] depends_on = [vsphere_virtual_machine.this] }
also, I've tried to declare a variable in variables.tf: variable "interfaces" { type = list(map(string)) default = [] } the same
variables.tf
variable "interfaces" { type = list(map(string)) default = [] }
Terraform v0.12.12
zabbix_provider - 0.0.4 Issue: duringterraform plan
, get error:Error: Unsupported argument
on ../../modules/vm_base/main.tf line 125, in resource "zabbix_host" "this": 125: interfaces
An argument named "interfaces" is not expected here. Did you mean to define a block of type "interfaces"?
main.tf:
resource "zabbix_host" "this" { count = "${var.vm_count}" host = "${element(vsphere_virtual_machine.this.*.name, count.index)}" interfaces = [{ main = true }] groups = [ "${zabbix_host_group.this}"] templates = ["Template OS Linux v2"] depends_on = [vsphere_virtual_machine.this] }