Skip to content

Commit

Permalink
Remove over-validation by google_cloudfunctions_function on project ids
Browse files Browse the repository at this point in the history
  • Loading branch information
rileykarson committed Jan 2, 2019
1 parent 73c4f92 commit ce63a02
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down

0 comments on commit ce63a02

Please sign in to comment.