How to access default parameters for included class

I’m trying to avoid using Hiera to set parameter values for my classes, and I’m getting stuck in one spot. An example is probably the easiest way to explain.

I have a class that looks like this:

class class1($param1 = 1) {
include ‘class2’
}

And then:

class class2($param2 = 1) {
#do nothing
}

As you can see, since I’m using the include-style syntax for class2, I can’t specify the value for $param2 inside class1 definition - this could normally be done via Hiera, and I’m trying to use Foreman to do it instead.

class1 is assigned to my node group. After importing my classes, I see both class1 and class2 in Foreman, and I see both param1 and param2 in the smart class parameter list.

I can use theForeman UI to override and provide a value for class1::param1, no problem. But I can’t figure out how to do it for param2.

I tried overriding the value in the smart class parameter list for class2:param2 but that doesn’t work. Looking at my node’s YAML, it doesn’t even contain param2.

Do I have to revert to the resource-like declaration for class2 and explicitly pass in a parameter value (which means I’d have to amend class1’s definition to include an extra parameter for param2)? Do I have to assign class2 to my node as well?

I’m fairly new to this so forgive me if I’m overlooking something obvious, but thank you for the help!

Foreman and Proxy versions:
Foreman v3.5.2

Actually this Foreman plugin (which is very old) seems to accomplish what I’m trying to do. But I hope there’s something newer than 10 years old to do this.