You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
+ /nix/store/jyxapkyfpi53p30x9kg4aqj66195bj43-opentofu-1.8.4/bin/tofu validate examples/nix-store-path
╷
│ Error: Module not installed
│
│ on examples/nix-store-path/main.tf line 36:
│ 36: module "nixos_deploy_document" {
│
│ This module is not yet installed. Run "tofu init" to install all modules required by this configuration.
╵
+ read dir
The text was updated successfully, but these errors were encountered:
I ran into the same issue; I believe this occurs mainly when running tofu validate on a project that was initialized with terraform init. However, IMHO, Terraform users should not be forced to use OpenTofu and vice versa; perhaps a better option would be to make both terraform-validate and terraform-format hooks support both Terraform and OpenTofu, or to add separate hooks for each.
Regarding the first option, I believe something similar to #419 should work within the scope of the terraform-validate hook. This should give users the flexibility to use Terraform or OpenTofu:
hooks={terraform-validate={enable=true;package=pkgs.opentofu# or pkgs.terraform};}
It always errors with:
The text was updated successfully, but these errors were encountered: