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

Add option for `show` output

Open vladkasianenko opened this issue 3 years ago • 3 comments

There's no way to save the output from the show command. image

terraform show -json > $(Build.ArtifactStagingDirectory)/tfstate.json is what I run as a bash command instead. I guess it would be nice to have this command so there's possibility to save output (binary or json).

vladkasianenko avatar Jun 29 '21 14:06 vladkasianenko

@vladkasianenko would you have any concerns about the file potentially containing sensitve data such as access keys and passwords? What expectations if any would you have of the task to protect the data written to this file?

charleszipp avatar Jul 21 '21 13:07 charleszipp

I think it is important to have this option. There are IaaC scanning tools requiring you to be able to run show with -json and output a file so the generated json formatted plan file can be used for scanning.

Dilergore avatar Mar 25 '22 07:03 Dilergore

Really want this feature to be added, cos the show results could be used along with shell scripts for further processing.

yunxi-zhang avatar Jul 11 '23 13:07 yunxi-zhang