From ed7ae045fb8bc03f3a897286c7f4e4bd9b24bd39 Mon Sep 17 00:00:00 2001 From: The Magician Date: Wed, 2 Jan 2019 10:48:49 -0800 Subject: [PATCH] Remove over-validation by google_cloudfunctions_function on project ids (#300) /cc @rileykarson --- google-beta/resource_cloudfunctions_function.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/google-beta/resource_cloudfunctions_function.go b/google-beta/resource_cloudfunctions_function.go index a963808977..3e4b2806c3 100644 --- a/google-beta/resource_cloudfunctions_function.go +++ b/google-beta/resource_cloudfunctions_function.go @@ -52,11 +52,7 @@ func (s *cloudFunctionId) terraformId() string { } func parseCloudFunctionId(id string, config *Config) (*cloudFunctionId, error) { - parts := strings.Split(id, "/") - - cloudFuncIdRegex := regexp.MustCompile("^([a-z0-9-]+)/([a-z0-9-])+/([a-zA-Z0-9_-]{1,63})$") - - if cloudFuncIdRegex.MatchString(id) { + if parts := strings.Split(id, "/"); len(parts) == 3 { return &cloudFunctionId{ Project: parts[0], Region: parts[1],