EMD Blog

Github Actions Terraform Output 이슈 본문

CICD

Github Actions Terraform Output 이슈

EmaDam 2022. 9. 4. 07:58

Github Actions에서 Terraform output 출력 시 이상한 값이 출력됨. output 값이 출력되는 것이 아니라 run에 해당되는 프로세스가 출력됨.

 

[예상한 값]

192.168.1.129

[실제 출력 값]

/home/runner/work/_temp/067af7a4-257b-4fd1-87b4-26517e149c8d/terraform-bin -chdir=infra output -raw database_ip 192.168.1.129::debug::Terraform exited with code 0. ::debug::stdout: 192.168.1.129 ::debug::stderr: ::debug::exitcode: 0 ::set-output name=stdout::192.168.1.129 ::set-output name=stderr:: ::set-output name=exitcode::0

 

확인해보니 terraform setup 시 terraform_wrapper값을 false로 지정해줘야 함.

https://blog.nillsf.com/index.php/2020/08/25/how-to-use-terraform-output-in-a-github-action/