chore(cli): warn on template push or create when no lockfile present (#8059)

This commit is contained in:
Colin Adler
2023-06-20 10:02:44 -05:00
committed by GitHub
parent a47a9b1cfe
commit adf14f1917
11 changed files with 272 additions and 8 deletions

View File

@ -34,6 +34,10 @@ func dirHasExt(dir string, exts ...string) (bool, error) {
return false, nil
}
func DirHasLockfile(dir string) (bool, error) {
return dirHasExt(dir, ".terraform.lock.hcl")
}
// Tar archives a Terraform directory.
func Tar(w io.Writer, directory string, limit int64) error {
// The total bytes written must be under the limit, so use -1