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

Nested Host / Service variables #21

Open claudekenni opened 6 years ago

claudekenni commented 6 years ago

Is it possible to extend the variables so they can be nested? So we can do something like this?

vars.partition["/"] = { warn = "90%", crit = "95%" }
claudekenni commented 6 years ago

For Services something like this in Terraform:

resource "icinga2_service" "my-service" {
  name          = "dfdsafdsafds"
  hostname      = "${icinga2_host.host.hostname}"
  check_command = "nrpe"

  vars {
    nrpe_port = "6666"
    nrpe_timeout = 35
    dummy_state = 1
    dummy_text = "UNKNOWN SERVICE STATUS"
    nrpe_command = "check_disk_auto"
    nrpe_arguments = [ "90%", "95%", "/" ]
  }

}
lazzurs commented 4 years ago

With the current Terraform datatypes this would be possible but requires some work on the lib as well as this provider.

Will look to impliment this shortly.