Skip to content

Comments

Add parameter for terraform executable (for compatibility with OpenTofu)#31

Merged
orangekame3 merged 1 commit intofuture-architect:mainfrom
zekroTJA:main
Dec 20, 2024
Merged

Add parameter for terraform executable (for compatibility with OpenTofu)#31
orangekame3 merged 1 commit intofuture-architect:mainfrom
zekroTJA:main

Conversation

@zekroTJA
Copy link
Contributor

@zekroTJA zekroTJA commented Dec 5, 2024

I've added a new global parameter --executable (or short -e), to set the path or name of the executable to be executed in the terraform commands. Therefore, this tool can also be used with OpenTofu or similar forks of Terraform.

The default value for the flag is read from the TFTARGET_EXECUTABLE environment variable, so that users can set their desired executable in their shell profiles.

Otherwise, the PATH environment variable is checked first for the terraform executable and then for the tofu executable. If one of them is found, it will be used as default for the parameter. If none is found, the program will exit with an error.

Please let me know what you think of this change.

@orangekame3
Copy link
Collaborator

orangekame3 commented Dec 19, 2024

@zekroTJA
Thanks I'll check it in this weekend.

Copy link
Collaborator

@orangekame3 orangekame3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. This change is very good. approve.

@orangekame3 orangekame3 merged commit 1eeeffa into future-architect:main Dec 20, 2024
@zekroTJA
Copy link
Contributor Author

Thank you very much <3

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

Successfully merging this pull request may close these issues.

2 participants