Skip to content

Commit

Permalink
Remove over-validation by google_cloudfunctions_function on project i…
Browse files Browse the repository at this point in the history
…ds (#2780)

<!-- This change is generated by MagicModules. -->
/cc @rileykarson
  • Loading branch information
modular-magician authored and rileykarson committed Jan 2, 2019
1 parent 00f87a3 commit 3c5529c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions google/resource_cloudfunctions_function.go
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 3c5529c

Please sign in to comment.