Enable-official-puppet7-repo not usuable in puppet manifest

I’m not sure if I have a thinking error now. I’m trying to use enable-official-puppet7-repo in a puppet manifest. That it fails I think is because a puppet variable can’t contain a hyphen. But of course I would like to use the same variable as for host-provisioning further on. The naming of the variable comes from the provisioning template puppetlabs_repo and I set it as a parameter within the provisioning setup in the operating system menu.

I’m using Foreman and Foreman-Proxy version 3.2.0 on Debian 11, if that might be relevant.