wayfair / terraform-provider-foreman

Mozilla Public License 2.0
24 stars 9 forks source link

invalid or unknown key when using foreman_host #9

Open congrmuk opened 5 years ago

congrmuk commented 5 years ago

Hi, i'm trying to create new host using resource foreman_host, but it complains about invalid or unkown keys. Any ideas what might be wrong ?

resource "foreman_host" "ntp" {
  name = "ntp01.example.com"
  ip   = "10.10.100.37"

  domain_id          = "${data.foreman_domain.domain.id}"
  operatingsystem_id = "${data.foreman_operatingsystem.centos72.id}"
}
terraform plan
Error: foreman_host.ntp: : invalid or unknown key: ip
congrmuk commented 5 years ago

Well, I used the sample one and it complains about : ip, mac, build, subnet_id, environment_id

resource "foreman_host" "TerraformTest" {
  name  = "foremanterraformtest.dev.company.com"
  ip    = "10.228.170.38"
  mac   = "C0:FF:EE:BA:BE:00"
  build = "true"

  domain_id          = "${data.foreman_domain.dev.id}"
  environment_id     = "${data.foreman_environment.production.id}"
  hostgroup_id       = "${data.foreman_hostgroup.DC1VM.id}"
  operatingsystem_id = "${data.foreman_operatingsystem.Centos74.id}"
  subnet_id          = "${data.foreman_subnet.app1.id}"
}