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

Group is required when adding a host to icinga2 #8

Closed caseyr232 closed 6 years ago

caseyr232 commented 6 years ago

Fix icinga2 CreateHost, groups is required option

lrsmith commented 6 years ago

@caseyr232 Thank you for submitting this. The underlying issue has been fixed with github.com/lrsmith/go-icinga2-api/iapi@v0.2.2

Would you be willing to

  1. Update the PR to vendor go-icinga2-api to v0.2.2
  2. Make 'groups' an optional parameter, since its not required when creating a host via Icinga2 API and v0.2.2 will now correctly account for a group not being set, and
  3. Create a separate test in resource_icinga2_host_test.go to test specifying a group when creating a host.
  4. Reset TestAccCreateBasicHost to test and verify that thing work without a group being specified.

If that sounds good and you can make those changes I'll get it merged in.

Thank you again

lrsmith commented 6 years ago

@caseyr232 I went ahead and branched off your changes and made the above changes in https://github.com/terraform-providers/terraform-provider-icinga2/pull/14 The commit has your changes and mine. I am going to close out this PR and merge in 14. Thank you again for the patch.