For non-geodesic users, allow `command` templates or auto search for popular directory formats
- Dominant language
- Go
- Stars
- 1.4k
- Forks
- 175
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 134
Description
### Describe the Feature
Currently we can use hard coded values
```yaml
components:
abc:
command: "/bin/terraform-1"
```
This works if you're using geodesic or nix or similar but it doesn't work if devs want to use native binaries.
The native binaries may be installed via asdf or tfenv or tfswitch.
- asdf `/Users/user/.asdf/installs/terraform/{version}/bin/terraform`
- tfenv `/home/user/.tfenv/versions/{version}/terraform`
- tfswitch `/home/user/.terraform.versions/terraform_{version}`
### Expected Behavior
An improved templating system
### Use Case
Allow using asdf, tfsec, tfenv or any terraform version manager by supplying command templates. This also removes hard coding binaries in the yaml leaving only the input that matters which is the version.
### Describe Ideal Solution
It would be nice in `atmos.yaml` to allow adding formats to check for
```yaml
terraform:
command_templates:
- "/Users/user/.asdf/installs/terraform/{version}/bin/terraform"
- "/home/user/.tfenv/versions/{version}/terraform"
- "/home/user/.terraform.versions/terraform_{version}"
```
then for components, we can use something like this
```yaml
components:
abc:
# should resolve to latest binary installed locally if available
# e.g. `/Users/user/.asdf/installs/terraform/1.6.2/bin/terraform`
command_version: "1"
# should resolve to latest binary installed locally if available
# e.g. `/Users/user/.asdf/installs/terraform/1.5.7/bin/terraform`
command_version: "1.5"
# should resolve to exact binary installed locally if available
# e.g. `/Users/user/.asdf/installs/terraform/1.6.2/bin/terraform`
command_version: "1.6.2"
```
### Alternatives Considered
_No response_
### Additional Context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.