foreman_host

A host managed by Foreman.

Example Usage

# Autogenerated example with required keys
resource "foreman_host" "example" {
}

Argument Reference

The following arguments are supported:

  • architecture_id - (Optional) ID of the architecture of this host
  • 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.
  • 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)
  • config_group_ids - (Optional) IDs of the applied config groups.
  • 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_power_operations - (Optional) Manage power operations, e.g. power on, if host's build flag will be enabled.
  • 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.
  • model_id - (Optional) ID of the hardware model if applicable
  • name - (Optional, Force New) Name of this host as stored in Foreman. Can be short name or FQDN, depending on your Foreman settings (especially the setting 'append_domain_name_for_hosts').
  • 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.
  • provision_method - (Optional, Force New) Sets the provision method in Foreman for this host: either network-based ('build') or image-based ('image')
  • ptable_id - (Optional) ID of the partition table the host should use
  • 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.
  • root_password - (Optional) Default root password
  • set_build_flag - (Optional) Sets the Foreman-internal 'build' flag on this host - even if it is already built completely.
  • shortname - (Optional, Force New) The short name of this host. Example: when the FQDN is 'host01.example.org', then 'host01' is the short name.
  • subnet_id - (Optional) ID of the subnet the host should be placed in

Attributes Reference

The following attributes are exported:

  • architecture_id - ID of the architecture of this host
  • 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 -
  • config_group_ids - IDs of the applied config groups.
  • 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.
  • fqdn - Host fully qualified domain name. Read-only value to be used in variables.
  • 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_power_operations - Manage power operations, e.g. power on, if host's build flag will be enabled.
  • 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.
  • model_id - ID of the hardware model if applicable
  • name - Name of this host as stored in Foreman. Can be short name or FQDN, depending on your Foreman settings (especially the setting 'append_domain_name_for_hosts').
  • 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.
  • provision_method - Sets the provision method in Foreman for this host: either network-based ('build') or image-based ('image')
  • ptable_id - ID of the partition table the host should use
  • 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.
  • root_password - Default root password
  • set_build_flag - Sets the Foreman-internal 'build' flag on this host - even if it is already built completely.
  • shortname - The short name of this host. Example: when the FQDN is 'host01.example.org', then 'host01' is the short name.
  • subnet_id - ID of the subnet the host should be placed in
  • token - Build token. Can be used to signal to Foreman that a host build is complete.