terraform-github-actions
terraform-github-actions copied to clipboard
Add output for warnings during apply phase
Suggestion
Hi,
I just cam a across a warning for a deprecated field, e.g:
Warning: "use_microsoft_graph": [DEPRECATED] This field now defaults to `true` and will be removed in v1.3 of Terraform Core due to the deprecation of ADAL by Microsoft.
I guess this will happen from time to time, as providers are changing. Would it be possible to add this output from the apply action also to the PR comment output? This might save some time, as not many people will actively dig through the action log (if the action completed successfully).
Other idea would be a variable which can be used as output for another action (e.g. a send-mail action) to send these warnings.
Cheers, cberge908
Hi @cberge908, warnings should be included at the bottom of the plan in the PR comment. Can you show the complete workflow log so we can try and see why that isn't working?
Could you also try and see if the warning is reported by dflook/terraform-validate?
Hi @dflook, the warning was only included in the log file of the apply action. During the tf plan action no warning was reported. Also the PR comment did not contain the warning at the bottom. Also after the apply was completed there was no update to the content of the PR comment (besides the change from applying plan -> plan applied in ...).
Regarding validate I can't really judge, I'm not using this action. Only plan, fmt and apply.
Do you need the plan or the apply job log? I'm asking because I need to mask some output (as we're using an own GHES instance).
The apply log would be most helpful
Here it is: https://gist.github.com/cberge908/8517254fbb55a4e19bf829447756f500