What is `terraform console` useful for?
BeginnerConceptWorkflow and CLI
Answer
It is a REPL that evaluates expressions against current config and state, handy for testing functions and for expressions before committing them.
$ terraform console
> cidrsubnet("10.0.0.0/16", 8, 3)
"10.0.3.0/24"
> [for s in ["a","b"] : upper(s)]
More on Workflow and CLI
What does `terraform init` do?BeginnerWhat does `terraform plan` do?BeginnerWhat does `terraform apply` do and what is `-auto-approve`?BeginnerWhat does `terraform destroy` do?BeginnerWhat do `terraform fmt` and `terraform validate` check?BeginnerWhy save a plan with `-out` and apply that file?Intermediate