Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTFVarsFromWorkdir ¶
GetTFVarsFromWorkdir scans the provided workdir directory for all .tfvars files and returns their filenames. If workdir is empty, it returns an error.
Parameters:
- workdir: The directory to scan for .tfvars files. This parameter is required.
Returns:
- []string: A slice of filenames of all .tfvars files found in the workdir.
- error: An error if the workdir is empty or if there is an error during the directory traversal.
Example:
tfvarFiles, err := GetTFVarsFromWorkdir("/path/to/terraform/dir") if err != nil { log.Fatalf("Error getting .tfvars files: %v", err) } fmt.Printf(".tfvars files: %v\n", tfvarFiles)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.