mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-02 20:54:57 +00:00
Update cheatsheets
This commit is contained in:
29
tldr/terraform-console
Normal file
29
tldr/terraform-console
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# terraform console
|
||||
|
||||
> Start an interactive console for evaluating Terraform expressions.
|
||||
> More information: <https://developer.hashicorp.com/terraform/cli/commands/console>.
|
||||
|
||||
- Start an interactive console to evaluate expressions:
|
||||
|
||||
`terraform console`
|
||||
|
||||
- Evaluate expressions against the planned state instead of current state:
|
||||
|
||||
`terraform console -plan`
|
||||
|
||||
- Evaluate a specific expression non-interactively:
|
||||
|
||||
`echo "{{expression}}" | terraform console`
|
||||
|
||||
- Specify values for input variables:
|
||||
|
||||
`terraform console -var '{{name1}}={{value1}}' -var '{{name2}}={{value2}}'`
|
||||
|
||||
- Specify values for input variables from a file:
|
||||
|
||||
`terraform console -var-file {{path/to/file.tfvars}}`
|
||||
Reference in New Issue
Block a user