Closed spencerfong-iceye closed 7 months ago
For reference, this is what shows up when viewing the run in Terraform Cloud:
Hello @spencerfong-iceye, I can reproduce the problem. It's a bug in Terraform, but I think I can work around it.
Terraform Cloud is increasingly a completely separate product to Terraform, crammed into the same cli. I don't particularly care to support it better than Hashicorp themselves.
Hello @spencerfong-iceye, I can reproduce the problem. It's a bug in Terraform, but I think I can work around it.
Terraform Cloud is increasingly a completely separate product to Terraform, crammed into the same cli. I don't particularly care to support it better than Hashicorp themselves.
Thanks very much for addressing this! Would you be willing to create a possible fix or workaround for this bug in the Action if you have ideas in mind already? If not then I understand completely; I will probably just change my workflow to setup and run Terraform manually in that case. Regardless I appreciate all your work on these actions so far, they've definitely saved me a lot of time and headache!
Also I just want to mention this seems to be happening with workspaces below 1.6.0
as well, I just ran into the exact same issue in a workspace running 1.5.7
. The earliest version I've noticed doesn't have this problem is a workspace running 1.1.9
, but I'm not sure what the latest version is that wouldn't have this problem; I haven't done extensive testing in that regard.
I think this is fixed in v1.41.2.
Hi @dflook, thank you for the update! I can confirm using v1.41.2 fixes the issue, apply runs are now confirmed automatically for workspaces using 1.6.0 and above. I appreciate your help!
Problem description
When running the
terraform-apply
action while using a Terraform version of1.6.0
or above and cloud backend, it seems like the Terraform Cloud agent runs the included plan and apply as part of a "saved plan run". This results in theterraform-apply
action hanging during the actual apply stage, as it requires someone to manually go to the run within Terraform Cloud and click the "Confirm & Apply" button.Note that this isn't an issue with Terraform versions below
1.6.0
, as saved plans were only introduced starting in this version.Terraform version
1.6.6
Backend
cloud
Workflow YAML
Workflow log
Has debug logging been enabled?
ACTIONS_STEP_DEBUG
secret was set totrue
when capturing the workflow log above.