Skip to content

Commit

Permalink
[Terraform]: Remove over-validation by google_cloudfunctions_function…
Browse files Browse the repository at this point in the history
… on project ids (#1128)

Merged PR #1128.
  • Loading branch information
rileykarson authored and modular-magician committed Jan 2, 2019
1 parent 8acd339 commit 3b9f222
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build/terraform
2 changes: 1 addition & 1 deletion build/terraform-beta
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 3b9f222

Please sign in to comment.