Icinga / terraform-provider-icinga2

Terraform Icinga2 provider
https://www.terraform.io/docs/providers/icinga2/
Mozilla Public License 2.0
21 stars 20 forks source link

Problem with icinga2 host provisionning #19

Closed ghost closed 5 years ago

ghost commented 6 years ago

This issue was originally opened by @ahany007 as hashicorp/terraform#18743. It was migrated here as a result of the provider split. The original body of the issue is below.


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

provider.aws v1.31.0
provider.icinga2 v0.1.1

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

lrsmith commented 5 years ago

Should be resolved with todays 0.2.0 release