azure-pipelines-tasks-terraform icon indicating copy to clipboard operation
azure-pipelines-tasks-terraform copied to clipboard

Terraform Plan Tab in Pipeline runs details doesn't show plans

Open brampostma opened this issue 2 years ago • 27 comments

Describe the bug I have a Azure Devops Pipeline in yaml with a Terraform Plan task in every Stage (with stages dev,tst,acc,prd). Those Plan tasks publish their plans, this works fine and I can see the plans from the pipeline run overview page. The problem is that when the plan task of the first stage (dev) does not have any changes it will not publish anything to the pipeline run overview, even tho the other stages plan tasks contain have changes.

To Reproduce Steps to reproduce the behavior:

  1. Setup a pipeline with multiple stages and a terraform@cli tasks in each stage:
    - task: TerraformCLI@0
    displayName: 'Terraform : plan'
    inputs:
      command: plan
      publishPlanResults: ${{ parameters.publishPlanResults }}
  1. Execute pipeline where the first stage doesn't have any changes and further stages do.
  2. Look at Terraform plan tab in pipeline run results page.

Expected behavior I expect to see the plans of the other stages to be visable in the pipeline run overview, but i get this: image

even tho the test stage has changes: image

brampostma avatar May 08 '23 12:05 brampostma

More details in #390

jason-johnson avatar Nov 03 '23 13:11 jason-johnson

Yeah, this is pretty annoying :) and makes the feature almost unusable for multistage (with plan) pipelines

BHellstream avatar Feb 05 '24 13:02 BHellstream

Same problem, @jason-johnson do you have a fix scheduled for this feature? THX.

tomas0620 avatar Mar 21 '24 11:03 tomas0620

Just adding a note to say that I'm seeing the same behaviour. If one plan is empty then none at all will show on the terraform plan tab in a multistage pipeline, despite all publishPlanResults field having unique names per stage. As long as all terraform plan outputs have changes, then the published results shows correctly.

sam-bowman avatar May 24 '24 16:05 sam-bowman