Open dakota-marshall opened 10 months ago
any updates or workarounds?
any updates or workarounds?
Found workaround by myself - wrap tuples with jsonencode()
in terraform manifest and then unwrap this data with Json.decode()
in icinga configuration.
any updates or workarounds?
Found workaround by myself - wrap tuples with
jsonencode()
in terraform manifest and then unwrap this data withJson.decode()
in icinga configuration.
Nice workaround!
I found the issue in the source, but it's also apparently an upstream issue as well. The function that creates hosts on the API was only allowing a map of strings, instead of an interface to allow for other types. Once that PR is submitted upstream I plan on creating a PR here to get it resolved on the provider, but that repo hasn't seen activity in 4 years, so I am not holding my breath....
Worse case scenario, I will probably fork this provider and use my forked version of the icinga2-api module so that I can start using it in projects.
Hi there,
We have an Icinga host config that has tuples stored in the vars section of the host. When attempting to recreate this config using the icinga2 terraform provider, the plan errors out, as the vars seem to require a string.
Terraform Version
Affected Resource(s)
If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.
Terraform Configuration Files
https://gist.github.com/dakota-marshall/657c7f2ea36491a39f733a02039fce53
Debug Output
https://gist.github.com/dakota-marshall/448d27e7e2e757eb4c382f2602e73c18
Expected Behavior
Plan passes correctly, allowing my to pass a tuple to the variables that require it
Actual Behavior
The plan fails, stating that the variables require a string, not a tuple
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform init
terraform plan
Important Factoids
Here is an example of what our Icinga Host object config looks like for reference