terraform-coop / terraform-provider-foreman

Terraform provider for Foreman
https://registry.terraform.io/providers/terraform-coop/foreman
Mozilla Public License 2.0
33 stars 31 forks source link

since v0.5.7 foreman_host build parameter will be updated after successful built #115

Closed togoschi closed 1 year ago

togoschi commented 1 year ago

Beginning with release v0.5.7 the foreman_host build parameter will be updated after the host was successful built. This behaviour was different before und should be fixed. If you need to apply any terraform code changes after hosts are provisioned and running you need either to toggle build flags from true to false of every foreman_host or never reboot to prevent host rebuilding

An example of a terraform plan for a foreman_host instance which was successfully built before

# foreman_host.osd[0] will be updated in-place
  ~ resource "foreman_host" "osd" {
      ~ build                   = false -> true
        id                      = "1334"
        name                    = "vxstocph101.hcp-dev-infra.hanse-merkur.de"
        # (19 unchanged attributes hidden)

After reading release notes of v0.5.7 release PR https://github.com/terraform-coop/terraform-provider-foreman/pull/97 might sounds suspicious to me...

agriffit79 commented 1 year ago

Yes, that's bad. It was introduced in 49653dd.

@lhw doesn't feel like we should be forcing that value back to true once a host has built?

lhw commented 1 year ago

I'll revert that change then