Example of creating hosts via puppet

I would like to add hosts to our Foreman installation programmatically via puppet. Should I be using this:

If so, does anyone have an example of using it? For instance, what would the $facts hash need to include?

Expected outcome:

Foreman and Proxy versions:
Foreman 3.5.2
Foreman proxy 3.5.2

Foreman and Proxy plugin versions:
foreman_bootdisk 21.0.3
foreman_discovery 22.0.2
foreman_expire_hosts 8.1.0

Distribution and version:
Rocky 8.7

Other relevant data:

Sorry if I wasn’t clear in my initial post - the hosts I am trying to add to Foreman are hosts that will be built by Foreman (not hosts that will be part of the Foreman service). Thanks.