feat(cli): add --var shorthand for --variable (#8710)

`--variable` is used frequently enough to deserve a shorthand. Unfortunately,
`-v` is taken by verbose, and `-V` is too easily confused with version or
verbose, so we're left with "--var".
This commit is contained in:
Ammar Bandukwala
2023-07-25 09:36:02 -05:00
committed by GitHub
parent 30e16052d6
commit 2a01747804
9 changed files with 38 additions and 6 deletions

View File

@ -35,10 +35,10 @@ Coder. Consult the [migration](https://coder.com/docs/v2/latest/templates/parame
documentation for details on how to do so.
To supply values to existing existing Terraform variables you can specify the
`--variable` flag. For example
`-V` flag. For example
```bash
coder templates create envbox --variable namespace="mynamespace" --variable max_cpus=2 --variable min_cpus=1 --variable max_memory=4 --variable min_memory=1
coder templates create envbox --var namespace="mynamespace" --var max_cpus=2 --var min_cpus=1 --var max_memory=4 --var min_memory=1
```
## Contributions

View File

@ -22,8 +22,8 @@ This template provisions a [code-server](https://github.com/coder/code-server) i
```bash
coder templates create fly-docker-image \
--variable fly_api_token=$(flyctl auth token) \
--variable fly_org=personal
--var fly_api_token=$(flyctl auth token) \
--var fly_org=personal
```
> If the Coder server is also running as a fly.io app, then instead of setting variable `fly_api_token` you can also set a fly.io secret with the name `FLY_API_TOKEN`