github.com/danp/terraform@v0.9.5-0.20170426144147-39d740081351/builtin/providers/azurerm/validators.go (about) 1 package azurerm 2 3 import ( 4 "fmt" 5 6 "github.com/satori/uuid" 7 ) 8 9 func validateUUID(v interface{}, k string) (ws []string, errors []error) { 10 if _, err := uuid.FromString(v.(string)); err != nil { 11 errors = append(errors, fmt.Errorf("%q is an invalid UUUID: %s", k, err)) 12 } 13 return 14 }