foreman_host

A host managed by Foreman.

Example Usage

# Autogenerated example with required keys
resource "foreman_host" "example" {
  name = "compute01.dc1.company.com"
}

Argument Reference

The following arguments are supported:

  • bmc_success - (Optional) REMOVED - Tracks the partial state of BMC operations on host creation. If these operations fail, the host will be created in Foreman and this boolean will remain false. On the next terraform apply will trigger the host update to pick back up with the BMC operations.
  • build - (Optional) Whether or not this host's build flag will be enabled in Foreman. Default is true, which means host will be built at next boot.
  • comment - (Optional) Add additional information about this host.Note: Changes to this attribute will trigger a host rebuild.
  • compute_attributes - (Optional) Hypervisor specific VM options. Must be a JSON string, as every compute provider has different attributes schema
  • compute_profile_id - (Optional)
  • compute_resource_id - (Optional, Force New)
  • domain_id - (Optional, Force New) ID of the domain to assign to the host.
  • enable_bmc - (Optional) Enables PMI/BMC functionality. On create and update calls, having this enabled will force a host to poweroff, set next boot to PXE and power on. Defaults to false.
  • environment_id - (Optional) ID of the environment to assign to the host.
  • hostgroup_id - (Optional, Force New) ID of the hostgroup to assign to the host.
  • image_id - (Optional, Force New) ID of an image to be used as base for this host when cloning
  • interfaces_attributes - (Optional) Host interface information.
  • manage_build - (Optional) REMOVED, please use the new 'managed' key instead. Create host only, don't set build status or manage power states
  • managed - (Optional) Whether or not this host is managed by Foreman. Create host only, don't set build status or manage power states.
  • medium_id - (Optional, Force New) ID of the medium mounted on the host.
  • method - (Optional, Force New) REMOVED - use build argument instead to manage build flag of host.
  • model_id - (Optional) ID of the hardware model if applicable
  • name - (Required, Force New) Host fully qualified domain name.
  • operatingsystem_id - (Optional, Force New) ID of the operating system to put on the host.
  • owner_id - (Optional) ID of the user or usergroup that owns the host.
  • owner_type - (Optional) Owner of the host, must be either User ot Usergroup
  • parameters - (Optional) A map of parameters that will be saved as host parameters in the machine config.
  • puppet_class_ids - (Optional) IDs of the applied puppet classes.
  • retry_count - (Optional) Number of times to retry on a failed attempt to register or delete a host in foreman.

Attributes Reference

The following attributes are exported:

  • build - Whether or not this host's build flag will be enabled in Foreman. Default is true, which means host will be built at next boot.
  • comment - Add additional information about this host.Note: Changes to this attribute will trigger a host rebuild.
  • compute_attributes - Hypervisor specific VM options. Must be a JSON string, as every compute provider has different attributes schema
  • compute_profile_id -
  • compute_resource_id -
  • domain_id - ID of the domain to assign to the host.
  • domain_name - The domain name of the host.
  • enable_bmc - Enables PMI/BMC functionality. On create and update calls, having this enabled will force a host to poweroff, set next boot to PXE and power on. Defaults to false.
  • environment_id - ID of the environment to assign to the host.
  • hostgroup_id - ID of the hostgroup to assign to the host.
  • image_id - ID of an image to be used as base for this host when cloning
  • interfaces_attributes - Host interface information.
  • manage_build - REMOVED, please use the new 'managed' key instead. Create host only, don't set build status or manage power states
  • managed - Whether or not this host is managed by Foreman. Create host only, don't set build status or manage power states.
  • medium_id - ID of the medium mounted on the host.
  • method - REMOVED - use build argument instead to manage build flag of host.
  • model_id - ID of the hardware model if applicable
  • name - Host fully qualified domain name.
  • operatingsystem_id - ID of the operating system to put on the host.
  • owner_id - ID of the user or usergroup that owns the host.
  • owner_type - Owner of the host, must be either User ot Usergroup
  • parameters - A map of parameters that will be saved as host parameters in the machine config.
  • puppet_class_ids - IDs of the applied puppet classes.
  • retry_count - Number of times to retry on a failed attempt to register or delete a host in foreman.