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
// we only error if there is a filesystem error, 0 files is handled below
72
79
returnnil, err
73
80
}
74
81
82
+
// if no terraform files are found, return an error
75
83
iflen(tfFiles) ==0&&!failOverToDefaultLoginCfg {
76
84
currentDir, _:=os.Getwd()
77
-
returnnil, fmt.Errorf(`No Terraform configuration files found in %s
78
-
79
-
The Overmind CLI requires access to Terraform configuration files (.tf files) to discover and authenticate with cloud providers. Without Terraform configuration, the CLI cannot determine which cloud resources to interrogate.
80
-
81
-
To resolve this issue:
82
-
- Ensure you're running the command from a directory containing Terraform files (.tf files)
83
-
- Or create Terraform configuration files that define your cloud providers
84
-
85
-
For more information about Terraform configuration, visit: https://developer.hashicorp.com/terraform/language`, currentDir)
85
+
msgLines:= []string{
86
+
fmt.Sprintf("No Terraform configuration files found in %s", currentDir),
87
+
"",
88
+
"The Overmind CLI requires access to Terraform configuration files (.tf files) to discover and authenticate with cloud providers. Without Terraform configuration, the CLI cannot determine which cloud resources to interrogate.",
89
+
"",
90
+
"To resolve this issue:",
91
+
"- Ensure you're running the command from a directory containing Terraform files (.tf files)",
92
+
"- Or create Terraform configuration files that define your cloud providers",
93
+
"",
94
+
}
95
+
if!tfRecursive {
96
+
msgLines=append(msgLines, "- Or remove --no-recursion to scan subdirectories for Terraform stacks")
97
+
}
98
+
msgLines=append(msgLines, "For more information about Terraform configuration, visit: https://developer.hashicorp.com/terraform/language")
0 commit comments