terraform-provider-foreman
terraform-provider-foreman copied to clipboard
foreman_hostgroup with parameters fails
when adding a host group with parameters, i'm getting errors like this:
Error: json: cannot unmarshal bool into Go struct field ForemanKVParameter.parameters.value of type string
│
│ with foreman_hostgroup.Compute,
│ on hostgroups.tf line 1, in resource "foreman_hostgroup" "Compute":
│ 1: resource "foreman_hostgroup" "Compute" {
the resources look roughly like this:
resource "foreman_hostgroup" "Compute" {
name = "Compute"
parameters = var.default_hostgroup_parameters
}
variable "default_hostgroup_parameters" {
default = {
"efi_bootentry" = "NIC|Network"
"force-puppet" = "true"
"kickstart_liveimg" = "http://college.edu:8000/httpboot/rocky8_compute.tar"
"no-resolv-override" = "false"
"puppet_ca_server" = "ca.college.edu"
"puppet_server" = "compile01.college.edu"
"pxe_kernel_options" = "biosdevname=1 net.ifnames=1"
"remote_execution_ssh_keys" = "ssh-rsa <ssh key here>"
"remote_execution_ssh_user" = "root"
"run-puppet-in-installer" = "false"
"skip-puppet-setup" = "false"
}
}
i've tried quoting the booleans, quoting the keys. neither seems to work, and i'm not sure if the provider's complaining about the booleans in that parameters map or something else entirely. this is happening with the 0.6.0 or the last 0.5.8 provider releases, at least.
what's the proper format for adding host group parameters? am i missing something?