What I'm actually trying to do is the following: Use pipelines with the same deploy script for different environments. Each environment would have a variable group with the settings required to deploy there.
But it seems difficult to specify a variable group in the YAML file that is not hardcoded. I would like the pipeline to have a pipeline variable to specify which variable group to use.
I have found some pointers where this seems possible using templates. If that is the only way, then so be it. But I'm hoping there is a more straighforward way.