func CreateDirectory(namespace string, instance string) (string, error) {
	var fullName string
	paths := []string{"instance", "bucket"}
	parentDir := os.TempDir()
	pathName := parentDir + "/" + namespace + "_" + instance
	for _, k := range paths {
		fullName = filepath.Join(pathName, k)
		_, err := os.Stat(fullName)
		if os.IsNotExist(err) {
			err = os.MkdirAll(fullName, os.ModePerm)
			if err != nil {
				log.Error(err, "unable to create directory")
				return "", err
			}
		}
	}

	return pathName, nil
}
//CreateDirectory create a directory to host generated tf based on namespace and instance name
CreateDirectory create a directory to host generated tf based on namespace and instance name
// CreateDirectory create a directory to host generated tf based on namespace and instance name
func CreateDirectory(namespace string, instance string) (string, error) {
	var fullName string
	paths := []string{"instance", "bucket"}
	parentDir := os.TempDir()
	pathName := parentDir + "/" + namespace + "_" + instance
	for _, k := range paths {
		fullName = filepath.Join(pathName, k)
		_, err := os.Stat(fullName)
		if os.IsNotExist(err) {
			err = os.MkdirAll(fullName, os.ModePerm)
			if err != nil {
				log.Error(err, "unable to create directory")
				return "", err
			}
		}
	}
	return pathName, nil
}
func CreateDirectory ( namespace string , instance string ) ( string , error ) { var fullName string paths := [ ] string { " " , " " } parentDir := os . TempDir ( ) pathName := parentDir + " " + namespace + " " + instance for _ , k := range paths { fullName = filepath . Join ( pathName , k ) _ , err := os . Stat ( fullName ) if os . IsNotExist ( err ) { err = os . MkdirAll ( fullName , os . ModePerm ) if err != nil { log . Error ( err , " " ) return " " , err } } } return pathName , nil }
CreateDirectory create a directory to host generated tf based on namespace and instance name
CreateDirectory create a directory to host generated tf based on namespace and instance name