본문 바로가기

퍼블릭 클라우드

테라폼(Terraform) 디버깅 활성화

반응형

테라폼(Terraform) 디버깅 활성화

  • 테라폼 계획 출력
terraform plan
  • 테라폼 디버스(debug) 화면 출력
TF_LOG=DEBUG terraform plan
  • 테라폼 디버스(debug) 파일 출력(terraform-debug.log 파일에 저장)
TF_LOG=DEBUG TF_LOG_PATH=/tmp/terraform-debug.log terraform plan
tail -10f /tmp/terraform-debug.log
$ tail -10f /tmp/terraform-debug.log
2021-05-18T14:52:31.226+0900 [WARN]  plugin.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2021-05-18T14:52:31.226+0900 [WARN]  plugin.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2021-05-18T14:52:31.226+0900 [WARN]  plugin.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"

 

  • 테라폼 로그 레벨(log level)
    • ERROR
    • WARN
    • INFO
    • DEBUG
    • TRACE

https://www.terraform.io/docs/extend/debugging.html

 

Extending Terraform: Debugging Providers - Terraform by HashiCorp

How to debug providers.

www.terraform.io

 

728x90
반응형