Skip to content

Commit

Permalink
Escape regex correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
slevenick committed Jul 17, 2019
1 parent 98ae489 commit d776d22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion third_party/terraform/resources/resource_google_project.go
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ func resourceGoogleProjectDelete(d *schema.ResourceData, meta interface{}) error
func resourceProjectImportState(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) {
pid := d.Id()
// Project id must start with a letter. This prevents users from importing with project number
matched, err := regexp.MatchString("^[^\d]", pid)
matched, err := regexp.MatchString("^[^\\d]", pid)
if err != nil {
return nil, fmt.Errorf("Error matching project %q: %s", pid, err)
}
Expand Down

0 comments on commit d776d22

Please sign in to comment.