-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main' into resolve-backend-tem…
…plate-content
- Loading branch information
Showing
12 changed files
with
76 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
""" | ||
Hook for checking values from cookiecutter variables before generating the project. | ||
See the following for more information: | ||
https://cookiecutter.readthedocs.io/en/1.7.0/advanced/hooks.html | ||
""" | ||
|
||
import sys | ||
|
||
project_name = "{{ cookiecutter.project_name }}" | ||
project_gc_project = "{{ cookiecutter.project_gc_project }}" | ||
|
||
# checking for proper length of the project name | ||
# note: we provide the limitation here based on constraints | ||
# for Google service accounts and how the variable is used within template. | ||
# See the following for more information: | ||
# https://cloud.google.com/iam/docs/service-accounts-create#creating | ||
if not 6 <= len(project_name) <= 21: | ||
print( | ||
"ERROR: %s Please use a project name of length 6-21 characters!" % project_name | ||
) | ||
sys.exit(1) | ||
|
||
# limitation for google project names | ||
# see the following for more information: | ||
# https://cloud.google.com/resource-manager/docs/creating-managing-projects | ||
if not 4 <= len(project_gc_project) <= 30: | ||
print( | ||
"ERROR: %s Please use a Google project name of length 4-30 characters!" % project_name | ||
) | ||
sys.exit(1) |
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
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
2 changes: 1 addition & 1 deletion
2
{{ cookiecutter.project_name }}/terraform/operations/accounts.tf
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
2 changes: 1 addition & 1 deletion
2
{{ cookiecutter.project_name }}/terraform/operations/versions.tf
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
2 changes: 1 addition & 1 deletion
2
{{ cookiecutter.project_name }}/terraform/state-management/versions.tf
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