Profile aliases
michidk opened this issue · comments
punktf deploy custom-wsl-debian
is lengthy to type.
One should be able to set aliase for profiles:
aliases:
- deb
- debian
so I can simply do punktf deploy deb
This either means we would need a global config file or we would need to parse each profile file to check if the alias matches. Currently we only check for the file name.
True. I would do the latter.
If at all possible i would like to not read all profiles for a deployment.
I think the global config solution (akin to the config file of git where aliases for commands can be set) would be more appropriate and we could skip parsing all profiles.
That way a user also could quickly see a conflict in profiles names/aliases and would not have to got through all of them.
aliases: - deb - debian
Will be implemented like this.
Thanks for the suggestion!
The current implementation reads all profile names and aliases before resolving the supplied cli argument or extends.
For now this is probably speedy enough, but if we have performance problems in the future we might want to revisit this (e.g. make it lazy).