terraform:debugging_terraform
Debugging Terraform
To troubleshoot further and find which resources couldn't be found, I tried this to add verbosity:-
study:aws-vpn-vpc $ export TF_LOG=DEBUG study:aws-vpn-vpc $ terraform plan
Options are TRACE, DEBUG, INFO, WARN or ERROR
, or unset TF_LOG
which deletes the variable or either VARIABLE= / VARIABLE=“”
which just sets it to NULL.
Set the following env variable (TF_LOG can be TRACE, DEBUG, INFO, WARN or ERROR):-
TF_LOG=trace terraform init
$ export TF_LOG=DEBUG; terraform plan 2019/03/19 10:50:20 [INFO] Terraform version: 0.11.13 2019/03/19 10:50:20 [INFO] Go runtime version: go1.11.5 2019/03/19 10:50:20 [INFO] CLI args: []string{"/usr/local/bin/terraform", "plan"} 2019/03/19 10:50:20 [DEBUG] Attempting to open CLI config file: /home/andrew/.terraformrc 2019/03/19 10:50:20 [DEBUG] File doesn't exist, but doesn't need to. Ignoring. Error: module "lambda": "key" is not a valid argument 2019/03/19 10:50:20 [INFO] CLI command args: []string{"plan"} 2019/03/19 10:50:20 [TRACE] module source: "../../modules/lambda" 2019/03/19 10:50:20 [DEBUG] plugin: waiting for all plugin processes to complete... $
terraform/debugging_terraform.txt · Last modified: by 127.0.0.1