Skip to content

Add docs for foreman_opentofu#4762

Draft
maximiliankolb wants to merge 1 commit intotheforeman:masterfrom
ATIX-AG:foreman_opentofu
Draft

Add docs for foreman_opentofu#4762
maximiliankolb wants to merge 1 commit intotheforeman:masterfrom
ATIX-AG:foreman_opentofu

Conversation

@maximiliankolb
Copy link
Copy Markdown
Contributor

What changes are you introducing?

Documentation for OpenTofu plugin.

Why are you introducing these changes? (Explanation, links to references, issues, etc.)

Anything else to add? (Considerations, potential downsides, alternative solutions you have explored, etc.)

Refs https://github.com/ATIX-AG/foreman_opentofu/

Contributor checklists

  • I am okay with my commits getting squashed when you merge this PR.
  • I am familiar with the contributing guidelines.

Please cherry-pick my commits into:

  • Foreman 3.18/Katello 4.20 (Satellite 6.19)
  • Foreman 3.17/Katello 4.19
  • Foreman 3.16/Katello 4.18 (Satellite 6.18; orcharhino 7.6 and 7.7)
  • Foreman 3.15/Katello 4.17
  • Foreman 3.14/Katello 4.16 (Satellite 6.17; orcharhino 7.4; orcharhino 7.5)
  • Foreman 3.13/Katello 4.15 (EL9 only)
  • Foreman 3.12/Katello 4.14 (Satellite 6.16; orcharhino 7.2 on EL9 only; orcharhino 7.3)
  • We do not accept PRs for Foreman older than 3.12.

@github-actions github-actions Bot added Needs tech review Requires a review from the technical perspective Needs style review Requires a review from docs style/grammar perspective Needs testing Requires functional testing labels Apr 9, 2026
@maximiliankolb maximiliankolb force-pushed the foreman_opentofu branch 2 times, most recently from 59c1145 to e20f0e5 Compare April 10, 2026 08:36
Comment on lines +15 to +16
. From the *Server Type* list, select the server type to use for provisioning.
. From the *Location* list, select the geographical location of the {compute-resource-target-name} datacenter.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the moment these values are not cross-referenced, so it might be wise to only select the server-type unless sure that the selected server-type is available in the selected Location.

Not all server-types are available in all locations on Hetzner.

Creating backups of hosts on {compute-resource-target-name} creates additional costs.
====
. From the *Image* list, select the image to use for provisioning.
. From the *Network* list, select the network to use for provisioning.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Limitation for Hetzner: the first network interface will get the public-IPs that are assigned to the new Host by Hetzner. So selecting a Subnet for the first network-interface may result in errors during deployment of the host.

. From the *Operating System* list, select the operating system of the image on {compute-resource-target-name}.
. From the *Architecture* list, select the architecture of the image on {compute-resource-target-name}.
. In the *Username* field, enter the user name of your golden image.
. Select *User Data* if the host image supports user data.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We mainly tested with this field checked. Leaving it unchecked may result in undefined behavior at the moment 😅

. From the *Architecture* list, select the architecture of the image on {compute-resource-target-name}.
. In the *Username* field, enter the user name of your golden image.
. Select *User Data* if the host image supports user data.
. In the *Password* field, enter the password of the user on your golden image.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hetzner Hint: for the Hetzner Images this usually needs to be empty (as far as our tests have shown).

Comment on lines +12 to +14
. In the {ProjectWebUI}, navigate to *Infrastructure* > *Compute Resources*.
. Select your {compute-resource-target-name} compute resource.
. On the *Virtual Machines* tab, click *Delete* from the *Actions* menu.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Virtual Machines tab is currently not implemented for OpenTofu. So Host deletion at the moment only works by deleting the Host via the Hosts pages (and having the destroy_vm_on_host_delete setting enabled).

Comment on lines +10 to +15
* On your {ProjectServer}, install the {compute-resource-name} plugin:
+
[options="nowrap", subs="+quotes,verbatim,attributes"]
----
# {foreman-installer} --enable-foreman-plugin-opentofu
----
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The RPM-Package for foreman_opentofu has a weak dependency on the tofu RPM package.
Foreman user's have to make sure the package is available from a repository enabled on the system.

The plugin needs the tofu-command to be present.

. Click *Resolve* next to *Provisioning templates* to confirm that the host can identify its provisioning templates.
. Click the *Virtual Machine* tab and confirm that these settings are populated with details from the host group and compute profile.
ifdef::hetzner-cloud[. From the *Server Type* List, select the server type on {compute-resource-target-name}.]
ifdef::hetzner-cloud[. From the *Location* List, select the geographical location of the host on {compute-resource-target-name}.]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional; as mentioned above it might result in error if the server-type is not available in the selected location.


[role="_abstract"]
{Project} integrates with several compute resource targets through {compute-resource-name}.
It provides a provisioning template for each supported {compute-resource-name} target.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we mention that the template-kind is opentofu_script?

On the ProvisioningTemplate page it makes it easier to find when searching for kind = opentofu_script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs style review Requires a review from docs style/grammar perspective Needs tech review Requires a review from the technical perspective Needs testing Requires functional testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants