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

Add build token attribute to host resource #97

Closed agriffit79 closed 1 year ago

agriffit79 commented 1 year ago

Useful for signaling build completion, especially when Foreman is managing Puppet CA.

lhw commented 1 year ago

Is this an undocumented feature of the api? Or does it require a newer version? I can't find any information about the field in the currently latest api docs: https://apidocs.theforeman.org/foreman/latest/apidoc/v2/hosts/index.html https://apidocs.theforeman.org/foreman/latest/apidoc/v2/hosts/create.html

agriffit79 commented 1 year ago

From my testing the attribute is only reported when the host is in "build mode". So that's maybe why they didn't document it. I don't think this should break any existing deployments, if the attribute is not present it will just be null.

agriffit79 commented 1 year ago

@lhw can you create a new release for this?

lhw commented 1 year ago

@agriffit79 still needed to fix that one persistent error in the test cases. Finally had some to fix it. Was harmless. But you never know. And better safe than sorry, before people lose data. New release is out now