jason-johnson / azure-pipelines-tasks-terraform

Azure Pipelines extension for Terraform
MIT License
124 stars 52 forks source link

Terraform Plan fails to create empty plan for multistage pipeline #267

Closed bothzoli closed 2 years ago

bothzoli commented 2 years ago

Describe the bug

I have a multistage pipeline with 4 stages, where all stages will do a terraform plan step. 2 of the stages produce a plan with changes, and the other 2 will have no change, thus an empty plan.

If I switch to the Terraform Plan tab it fails to display the plans. Checking the console I see an exception thrown from here. When debugging I see that the provided URL (attachment.href) returns a 404. I suppose that the empty plan was in fact not created.

To Reproduce Steps to reproduce the behavior: See the description above.

Expected behavior I expect that Terraform Plan displays plans regardless if any of them is empty.

bothzoli commented 2 years ago

This also happens if none of the stages produce a plan with changes. All the attachment URLs are returning 404.

bothzoli commented 2 years ago

Closing this as it's a duplicate of #268.