You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Terraform accepts the project_id without any trouble.
Actual Behavior
Terraform refuses to load the config with my project_id:
Error: google_project.my_test_project: "example.com:foobar-terraform-test-foo" project_id must be 6 to 30 with lowercase letters, digits, hyphens and start with a letter. Trailing hyphens are prohibited.
This breaks existing configurations which use a domain-scoped project IDs or very long project IDs.
Steps to Reproduce
terraform plan
Important Factoids
terraform-provider-google introduces in 1.13.0 "project: Added name and project_id plan-time validations".
The regex is ProjectIDRegex = "^[a-z][a-z0-9-]{4,28}[a-z0-9]$".
This regex did not change since 1.13.0 and is still the same in the current github HEAD.
Probably we should get rid of var ProjectIDRegex completely and only use const ProjectRegex (defined in the same file) everywhere? In the code we have, ProjectRegex is the project ID and not the project name.
The text was updated successfully, but these errors were encountered:
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!
ghost
locked and limited conversation to collaborators
Nov 16, 2018
Terraform Version
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
Terraform accepts the
project_id
without any trouble.Actual Behavior
Terraform refuses to load the config with my
project_id
:This breaks existing configurations which use a domain-scoped project IDs or very long project IDs.
Steps to Reproduce
terraform plan
Important Factoids
terraform-provider-google introduces in 1.13.0 "project: Added name and project_id plan-time validations".
The regex is
ProjectIDRegex = "^[a-z][a-z0-9-]{4,28}[a-z0-9]$"
.This regex did not change since 1.13.0 and is still the same in the current github HEAD.
References
Related change which fixes a similar issue: Allow other forms of project names to be matched..
Probably we should get rid of
var ProjectIDRegex
completely and only useconst ProjectRegex
(defined in the same file) everywhere? In the code we have,ProjectRegex
is the project ID and not the project name.The text was updated successfully, but these errors were encountered: