Variable Set Commands
General commands to manage Variable Sets.
tfx variable-set list
List Variable Sets available for a given Organization.
Using the --search flag allows filtering by variable set name with a given string.
Basic Example
$ tfx variable-set listUsing config file: /Users/tstraub/.tfx.hclList Variable Sets for Organization: firefly╭──────────────────────┬─────────────────────┬────────┬──────────┬───────────────────────────────╮│ NAME │ ID │ GLOBAL │ PRIORITY │ PARENT │├──────────────────────┼─────────────────────┼────────┼──────────┼───────────────────────────────┤│ aws-credentials │ varset-abc123XYZ456 │ false │ false │ organization:firefly ││ common-tags │ varset-def789GHI012 │ true │ false │ organization:firefly ││ production-overrides │ varset-jkl345MNO678 │ false │ true │ project:prj-ABC123defGHI789 │╰──────────────────────┴─────────────────────┴────────┴──────────┴───────────────────────────────╯Search Example
$ tfx variable-set list --search awsUsing config file: /Users/tstraub/.tfx.hclList Variable Sets for Organization: firefly╭─────────────────┬─────────────────────┬────────┬──────────┬──────────────────────╮│ NAME │ ID │ GLOBAL │ PRIORITY │ PARENT │├─────────────────┼─────────────────────┼────────┼──────────┼──────────────────────┤│ aws-credentials │ varset-abc123XYZ456 │ false │ false │ organization:firefly │╰─────────────────┴─────────────────────┴────────┴──────────┴──────────────────────╯Alias Example
$ tfx varset listUsing config file: /Users/tstraub/.tfx.hclList Variable Sets for Organization: firefly╭──────────────────────┬─────────────────────┬────────┬──────────┬───────────────────────────────╮│ NAME │ ID │ GLOBAL │ PRIORITY │ PARENT │├──────────────────────┼─────────────────────┼────────┼──────────┼───────────────────────────────┤│ aws-credentials │ varset-abc123XYZ456 │ false │ false │ organization:firefly ││ common-tags │ varset-def789GHI012 │ true │ false │ organization:firefly ││ production-overrides │ varset-jkl345MNO678 │ false │ true │ project:prj-ABC123defGHI789 │╰──────────────────────┴─────────────────────┴────────┴──────────┴───────────────────────────────╯tfx variable-set show
Show details of a given Variable Set by ID, including assigned workspaces, projects, and variables.
Example
$ tfx variable-set show -i varset-abc123XYZ456Using config file: /Users/tstraub/.tfx.hclShow Variable Set: varset-abc123XYZ456ID: varset-abc123XYZ456Name: aws-credentialsDescription: AWS credentials for production workloadsGlobal: falsePriority: falseParent: organization:fireflyWorkspaces: prod-us-east-1: ws-hLFv8c9bjgXC3mdK prod-us-west-2: ws-yN6DnhYxB39qqAreProjects:Variables: AWS_ACCESS_KEY_ID: var-GHI789jklMNO345 AWS_SECRET_ACCESS_KEY: var-JKL012mnoPQR678JSON Example
$ tfx variable-set show -i varset-abc123XYZ456 --json | jq .{ "id": "varset-abc123XYZ456", "name": "aws-credentials", "description": "AWS credentials for production workloads", "global": false, "priority": false, "parent": { "type": "organization", "id": "firefly" }, "workspaces": [ { "id": "ws-hLFv8c9bjgXC3mdK", "name": "prod-us-east-1" }, { "id": "ws-yN6DnhYxB39qqAre", "name": "prod-us-west-2" } ], "projects": [], "variables": [ { "id": "var-GHI789jklMNO345", "key": "AWS_ACCESS_KEY_ID", "value": "" }, { "id": "var-JKL012mnoPQR678", "key": "AWS_SECRET_ACCESS_KEY", "value": "" } ]}tfx variable-set create
Create a new Variable Set in the Organization.
| Flag | Description | Required |
|---|---|---|
--name / -n | Name of the Variable Set | Yes |
--description / -d | Description of the Variable Set | No |
--global | Apply this Variable Set to all workspaces in the organization | No |
--priority | Variable values in this set override workspace-level values | No |
Basic Example
$ tfx variable-set create --name aws-credentials --description "AWS credentials for production workloads"Using config file: /Users/tstraub/.tfx.hclCreate Variable Set for Organization: fireflyID: varset-abc123XYZ456Name: aws-credentialsDescription: AWS credentials for production workloadsGlobal: falsePriority: falseGlobal Variable Set Example
$ tfx variable-set create --name common-tags --description "Tags applied to all workspaces" --globalUsing config file: /Users/tstraub/.tfx.hclCreate Variable Set for Organization: fireflyID: varset-def789GHI012Name: common-tagsDescription: Tags applied to all workspacesGlobal: truePriority: falsePriority Variable Set Example
$ tfx variable-set create --name production-overrides --description "Overrides for production runs" --priorityUsing config file: /Users/tstraub/.tfx.hclCreate Variable Set for Organization: fireflyID: varset-jkl345MNO678Name: production-overridesDescription: Overrides for production runsGlobal: falsePriority: truetfx variable-set delete
Delete a Variable Set by ID.
Example
$ tfx variable-set delete -i varset-abc123XYZ456Using config file: /Users/tstraub/.tfx.hclDelete Variable Set: varset-abc123XYZ456Status: SuccessID: varset-abc123XYZ456