14. Troubleshooting
Logging
For debugging you can enable the logging level: OFF
, TRACE
, DEBUG
, INFO
, WARN
or ERROR
. TRACE
will give the Akamai outputs.
MacOS
export TF_LOG=DEBUG
Windows
$env:TF_LOG = "DEBUG"
Additionally you can set the path of the log with the TF_LOG_PATH variable:
MacOS
export TF_LOG_PATH=./akamai_tf.log
Windows
$env:TF_LOG_PATH = ".\akamai_tf.log"
If you are experiencing Akamai API-like errors you can turn on the API calls logging. Make sure TF_LOG is set to DEBUG, and then:
MacOS
export AKAMAI_HTTP_TRACE_ENABLED=true
Windows
$env:AKAMAI_HTTP_TRACE_ENABLED = "true"
Akamai Provider Code
Sometimes when the documentation is not enough you may need to dig into the Akamai provider's code (opens in a new tab). The cdoe is writen in Go.
Exercise
Configure
Enable logging for the Akamai API calls and review the output. Try to make sense of all the API calls happening based on your Terraform configuration.
Note: if you enabled logging to a log file be sure to add it to your .gitignore file to prevent from uploading it to your repository.