opendevstack / ods-pipeline-terraform

ODS Pipeline tasks for Terraform deployment - Experimental
Apache License 2.0
0 stars 0 forks source link

Decide how to use terraform output #5

Open henrjk opened 8 months ago

henrjk commented 8 months ago

Currently the plan stage does not set the plan output which an apply stage could use.

The plan may contain sensitive information and we need to be careful not to leak that. One starting point to explore the sensitive nature of terraform plan files is opentofu/issues/874.

At the moment I see 2 possible goals for using the terraform output:

Questions:

See also https://github.com/opendevstack/ods-pipeline-terraform/pull/2#discussion_r1431211865

tbugfinder commented 8 months ago

A plan output should be used for opa to decide (e.g. risk based approach) if the deployment should be reviewed before applying.

I wouldn't use it for environment promotion, though.

henrjk commented 8 months ago

A plan output should be used for opa to decide (e.g. risk based approach) if the deployment should be reviewed before applying. @tbugfinder Using the terraform plan to enable a flexible decision to decide whether a plan needs review/approval could be useful. I would assume that opa is just one possible tool for that however. Do you have suggestions on how the review/approval process might work?