From 1b38f4c4d7babb4776201fc338b2d050e512c3fd Mon Sep 17 00:00:00 2001 From: Andrey Tataranovich Date: Tue, 19 Mar 2019 00:10:58 +0300 Subject: [PATCH] Cloud function name allow underscores. (#3265) --- google/resource_cloudfunctions_function.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/google/resource_cloudfunctions_function.go b/google/resource_cloudfunctions_function.go index 2affed6b..ddafce2e 100644 --- a/google/resource_cloudfunctions_function.go +++ b/google/resource_cloudfunctions_function.go @@ -101,9 +101,9 @@ func resourceCloudFunctionsFunction() *schema.Resource { errors = append(errors, fmt.Errorf( "%q cannot be longer than 48 characters", k)) } - if !regexp.MustCompile("^[a-zA-Z0-9-]+$").MatchString(value) { + if !regexp.MustCompile("^[a-zA-Z0-9-_]+$").MatchString(value) { errors = append(errors, fmt.Errorf( - "%q can only contain letters, numbers and hyphens", k)) + "%q can only contain letters, numbers, underscores and hyphens", k)) } if !regexp.MustCompile("^[a-zA-Z]").MatchString(value) { errors = append(errors, fmt.Errorf(