config: fix NameRegexp validation to allow single-char names

This commit is contained in:
Mitchell Hashimoto 2016-12-08 23:13:19 -05:00
parent ef2500932d
commit 8b9e2c17cc
No known key found for this signature in database
GPG Key ID: 744E147AA52F5B0A
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ import (
// NameRegexp is the regular expression that all names (modules, providers,
// resources, etc.) must follow.
var NameRegexp = regexp.MustCompile(`(?i)\A[A-Z_][A-Z0-9\-\_]+\z`)
var NameRegexp = regexp.MustCompile(`(?i)\A[A-Z_][A-Z0-9\-\_]*\z`)
// Config is the configuration that comes from loading a collection
// of Terraform templates.