feat: support tools such as OpenTofu instead of Terraform #1554
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Close #1203
Close #1551
Caution
We don't usually use OpenTofu and Terragrunt, so we haven't done only simple verification.
Overview
This pull request enables us to execute tools compatible with Terraform instead of Terraform.
tfaction executes Terraform commands such as terraform init, fmt, validate, plan, apply, and so on.
This pull request enables us to replace Terraform with other tools compatible with Terraform.
You can use tools such as OpenTofu and Terragrunt instead of Terraform.
How
You can specify a tool by the setting
terraform_command
intfaction-root.yaml
andtfaction.yaml
.tfaction-root.yaml
tfaction.yaml
Then the given command is executed instead of
terraform
.For example, if
terraform_command
istofu
, commands such as tofu init, fmt, validate, plan, apply are executed instead of terraform.💡 Combine OpenTofu and Terragrunt
You can also combine OpenTofu and Terragrunt.
terraform_command
toterragrunt
TERRAGRUNT_TFPATH
totofu
💡 Validate
terraform_command
You can validate
terraform_command
in GitHub Actions Workflows.