diff --git a/builtin/providers/cloudstack/resources.go b/builtin/providers/cloudstack/resources.go index 53e017b14..f7115e793 100644 --- a/builtin/providers/cloudstack/resources.go +++ b/builtin/providers/cloudstack/resources.go @@ -121,7 +121,7 @@ func retrieveTemplateID(cs *cloudstack.CloudStackClient, zoneid, value string) ( // ID can be either a UUID or a UnlimitedResourceID func isID(id string) bool { - re := regexp.MustCompile(`^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|-1$`) + re := regexp.MustCompile(`^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|-1)$`) return re.MatchString(id) }