func (zv *ZoneValidator) ZoneValid(project string, zone string) error {
	zl, err := zv.ComputeClient.ListZones(project)
	if err != nil {
		gAPIErr, isGAPIErr := err.(*googleapi.Error)
		if isGAPIErr && gAPIErr.Code == 403 && len(gAPIErr.Errors) > 0 && gAPIErr.Errors[0].Reason == "accessNotConfigured" {
			return daisy.Errf("Compute Engine API not configured: %v", gAPIErr)
		}
		return daisy.Errf("Couldn't validate zone `%v`: %v", zone, gAPIErr)
	}
	for _, z := range zl {
		if z.Name == zone {
			return nil
		}
	}
	return daisy.Errf("%v is not a valid zone", zone)
}
ZoneValid validates zone is valid in the given project
package compute
import (
	"github.com/GoogleCloudPlatform/compute-image-tools/daisy"
	daisycompute "github.com/GoogleCloudPlatform/compute-image-tools/daisy/compute"
	"google.golang.org/api/googleapi"
)
type ZoneValidator struct {
	ComputeClient daisycompute.Client
}