Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decide how to use terraform output #5

Open
henrjk opened this issue Jan 2, 2024 · 2 comments
Open

Decide how to use terraform output #5

henrjk opened this issue Jan 2, 2024 · 2 comments

Comments

@henrjk
Copy link
Member

henrjk commented Jan 2, 2024

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:

  • environment promotion: In theory a plan artifact could allow to promote infrastructure to another environment. However I am not sure that the terraform plan does allow that as it might bake in environment concerns which would need to be flexible.

  • task consistency: Another usage of the terraform plan is to ensure that within a single task run the plan and apply stage are consistent.

Questions:

  • Would the potential to leak sensitive information by using a terraform plan output be offset by the value of using it?
  • Is environment promotion feasible and worthwhile?

See also #2 (comment)

@tbugfinder
Copy link

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
Copy link
Member Author

henrjk commented Jan 3, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants