Capture and read the terraform JSON plan file in a Matrix Strategy.
long-term
P
Professional Koi
Currently, the terraform JSON file can only be accessed properly if the step in not running with any looping strategy. When any looping strategy such as Matrix is employed the JSON file for all the runs cannot be accessed and only the last run can be read. This is not expected behaviour. Even using complex JEXL expression this is not possible. Please provide a method or Feature to access Plan for all the steps running under looping strategy.
Log In
Rohan Gupta
long-term
Thank you for your feature request we have added this feature to our backlog
P
Professional Koi
Want to read the JSON version of the Terraform Plan. In Harness doc it says to reference the JSON file containing the Terraform Plan using:
The JEXL expression is:
<+terraformPlanHumanReadable."pipeline.stages.[stage Id].spec.execution.steps.[step Id].tf_planHumanReadable">
However, the above points to 1 file. When the step is using a matrix strategy, it has more than 1 output files, one per iteration of the matrix. So what is the JEXL expression to use?
You should be able to setup a simple TF pipeline with a matrix and try it. I do not know what JEXL expression to use, hence the support ticket.
Rohan Gupta
Hey Professional Koi can you elaborate the use case here?
Rohan Gupta
pending feedback
Can elaborate further on the use case?
Our team had some questions -
Hi Jiang, could you elaborate on the use case here please? Are you using the Terraform Plan step in a Matrix/Loop and then exporting the JSON file of the plan from these steps?
Also, could you provide a sample of the expression you're using the access the generated JSON file?
Thanks,
Sudarshan
Sudarshan Purohit
Hi Jiang, could you elaborate on the use case here please? Are you using the Terraform Plan step in a Matrix/Loop and then exporting the JSON file of the plan from these steps?
Also, could you provide a sample of the expression you're using the access the generated JSON file?
Thanks,
Sudarshan
Prasad Satam
under review