forked from hashicorp/terraform-provider-google
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make validation of service accounts less strict (hashicorp#1109)
Signed-off-by: Modular Magician <[email protected]>
- Loading branch information
1 parent
48f08bc
commit 998996f
Showing
3 changed files
with
27 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,7 +41,7 @@ var ( | |
|
||
ServiceAccountLinkRegexPrefix = "projects/" + ProjectRegexWildCard + "/serviceAccounts/" | ||
PossibleServiceAccountNames = []string{ | ||
AppEngineServiceAccountNameRegex, | ||
ServiceDefaultAccountNameRegex, | ||
ComputeServiceAccountNameRegex, | ||
CreatedServiceAccountNameRegex, | ||
} | ||
|
@@ -51,12 +51,16 @@ var ( | |
|
||
// Format of service accounts created through the API | ||
CreatedServiceAccountNameRegex = fmt.Sprintf(RFC1035NameTemplate, 4, 28) + "@" + ProjectNameInDNSFormRegex + "\\.iam\\.gserviceaccount\\.com$" | ||
ProjectNameInDNSFormRegex = "[-a-z0-9\\.]{1,63}" | ||
|
||
// Format of default App Engine service accounts created by Google | ||
AppEngineServiceAccountNameRegex = ProjectRegex + "@appspot.gserviceaccount.com" | ||
// Format of service-created service account | ||
// examples are: | ||
// [email protected] | ||
// [email protected] | ||
// [email protected] | ||
ServiceDefaultAccountNameRegex = ProjectRegex + "@[a-z]+.gserviceaccount.com$" | ||
|
||
ProjectNameRegex = "^[A-Za-z0-9-'\"\\s!]{4,30}$" | ||
ProjectNameInDNSFormRegex = "[-a-z0-9\\.]{1,63}" | ||
ProjectNameRegex = "^[A-Za-z0-9-'\"\\s!]{4,30}$" | ||
) | ||
|
||
var rfc1918Networks = []string{ | ||
|