I am trying to create a new host on icinga2 using terraform i used the exact syntax as the terraform documentation but i found the below error:
icinga2_host.host: 1 error(s) occurred:
icinga2_host.host: Validation failed for object 'terraform-host-1' of type 'Host'; Attribute 'groups': Attribute must not be empty. Location: in /var/lib/icinga2/api/packages/_api/5ec3a468-6a3e-495c-9384-28dbaae1feba/conf.d/hosts/terraform-host-1.conf: 7:2-7:14
I am using terraform version:
Terraform v0.11.7
provider.aws v1.31.0
provider.icinga2 v0.1.1
code:
resource "icinga2_hostgroup" "terraform" {
name = "terraform-hostgroup-1"
display_name = "Terraform Test HostGroup"
}
Hi there,
I am trying to create a new host on icinga2 using terraform i used the exact syntax as the terraform documentation but i found the below error:
icinga2_host.host: 1 error(s) occurred:
icinga2_host.host: Validation failed for object 'terraform-host-1' of type 'Host'; Attribute 'groups': Attribute must not be empty. Location: in /var/lib/icinga2/api/packages/_api/5ec3a468-6a3e-495c-9384-28dbaae1feba/conf.d/hosts/terraform-host-1.conf: 7:2-7:14
I am using terraform version: Terraform v0.11.7
code: resource "icinga2_hostgroup" "terraform" { name = "terraform-hostgroup-1" display_name = "Terraform Test HostGroup" }
provider "icinga2" { api_url = "https://localhost:5665/v1" api_user = "root" api_password = "root" insecure_skip_tls_verify = true }
resource "icinga2_host" "host" { hostname = "terraform-host-1" address = "10.10.10.1" check_command = "hostalive"
templates= ["generic-host"]
}
steps to produce: terraform apply