tfvars

package
v0.0.17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTFVarsFromWorkdir

func GetTFVarsFromWorkdir(workdir string) ([]string, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL