Context
To assist in the OpenTofu implementation we need a centralised action that we can use to both show the TF Plan with the expected changes in PRs and to apply the TF code after merging with main.
This action should allow us to define when we run plan and when we run apply, so we can ensure that TF code only when the branch in which it is run is main.
Ideally, we should use this action as a wrapper for the Tofu checkout(https://github.com/marketplace/actions/opentofu-setup-tofu) and tf-via-pr (https://github.com/OP5dev/TF-via-PR) actions since that solves pretty much all of our use case, and just use the workflow invocation of this action to pass the config we desire, like tf code directory, when to use plan and apply, etc...
Context
To assist in the OpenTofu implementation we need a centralised action that we can use to both show the TF Plan with the expected changes in PRs and to apply the TF code after merging with main.
This action should allow us to define when we run plan and when we run apply, so we can ensure that TF code only when the branch in which it is run is
main.Ideally, we should use this action as a wrapper for the Tofu checkout(https://github.com/marketplace/actions/opentofu-setup-tofu) and tf-via-pr (https://github.com/OP5dev/TF-via-PR) actions since that solves pretty much all of our use case, and just use the workflow invocation of this action to pass the config we desire, like tf code directory, when to use plan and apply, etc...