Skip to content

Commit

Permalink
Refine flags descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
shihanng committed Nov 26, 2021
1 parent d830103 commit eb99f4c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,11 @@ variable "docker_ports" {
```
- The `-r, --resource` flag outputs all variables as `tfe_variable`
Terraform resource of [Terraform Enterprise (tfe) provider](https://registry.terraform.io/providers/hashicorp/tfe/latest/docs/resources/variable).
resource of [Terraform Enterprise (tfe) provider](https://registry.terraform.io/providers/hashicorp/tfe/latest/docs/resources/variable).
- The `-w, --workspace` flag outputs all variables in the payload format for the API
<https://www.terraform.io/docs/cloud/api/workspace-variables.html#sample-payload>.
- The `-w, --workspace` flag outputs all variables in the payload format for the
[Workspace Variables API](https://www.terraform.io/docs/cloud/api/workspace-variables.html#sample-payload)
<https://www.terraform.io/docs/cloud/api/workspace-variables.html#sample-payload>
which can used together with `jq` to filter variables by key name.
```
Expand Down Expand Up @@ -141,13 +142,13 @@ Flags:
-e, --env-var Print output in export TF_VAR_image_id=ami-abc123 format
-h, --help help for tfvar
--ignore-default Do not use defined default values
-r, --resource Print output in hashicorp/tfe tfe_variable resource format
-r, --resource Print output in Terraform Enterprise (tfe) provider's tfe_variable resource format
--var stringArray Set a variable in the generated definitions.
This flag can be set multiple times.
--var-file stringArray Set variables from a file.
This flag can be set multiple times.
-v, --version version for tfvar
-w, --workspace Print output variables as payloads for workspace API
-w, --workspace Print output variables as payloads for Workspace Variables API
```


Expand Down
4 changes: 2 additions & 2 deletions cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ one would write it in variable definitions files (.tfvars).
variable definitions files e.g. terraform.tfvars[.json] *.auto.tfvars[.json]`)
rootCmd.PersistentFlags().BoolP(flagDebug, "d", false, "Print debug log on stderr")
rootCmd.PersistentFlags().BoolP(flagEnvVar, "e", false, "Print output in export TF_VAR_image_id=ami-abc123 format")
rootCmd.PersistentFlags().BoolP(flagResource, "r", false, "Print output in hashicorp/tfe tfe_variable resource format")
rootCmd.PersistentFlags().BoolP(flagWorkspace, "w", false, "Print output variables as payloads for workspace API")
rootCmd.PersistentFlags().BoolP(flagResource, "r", false, "Print output in Terraform Enterprise (tfe) provider's tfe_variable resource format")
rootCmd.PersistentFlags().BoolP(flagWorkspace, "w", false, "Print output variables as payloads for Workspace Variables API")
rootCmd.PersistentFlags().Bool(flagNoDefault, false, "Do not use defined default values")
rootCmd.PersistentFlags().StringArray(flagVar, []string{}, `Set a variable in the generated definitions.
This flag can be set multiple times.`)
Expand Down

0 comments on commit eb99f4c

Please sign in to comment.