Skip to content
This repository has been archived by the owner on Mar 30, 2022. It is now read-only.

invalid or unknown key when using foreman_host #9

Open
congrmuk opened this issue Jun 4, 2019 · 1 comment
Open

invalid or unknown key when using foreman_host #9

congrmuk opened this issue Jun 4, 2019 · 1 comment

Comments

@congrmuk
Copy link

congrmuk commented Jun 4, 2019

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
Copy link
Author

congrmuk commented Jun 4, 2019

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}"
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant