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 remainfalse
. On the nextterraform 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 schemacompute_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 tofalse
.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 cloninginterfaces_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 statesmanaged
- (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 applicablename
- (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 Usergroupparameters
- (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 schemacompute_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 tofalse
.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 cloninginterfaces_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 statesmanaged
- 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 applicablename
- 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 Usergroupparameters
- 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.