mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-04 17:51:11 +00:00
Remove over-validation by google_cloudfunctions_function on project ids (#2780)
<!-- This change is generated by MagicModules. --> /cc @rileykarson
This commit is contained in:
parent
00f87a3da2
commit
3c5529cfd6
@ -52,11 +52,7 @@ func (s *cloudFunctionId) terraformId() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func parseCloudFunctionId(id string, config *Config) (*cloudFunctionId, error) {
|
func parseCloudFunctionId(id string, config *Config) (*cloudFunctionId, error) {
|
||||||
parts := strings.Split(id, "/")
|
if parts := strings.Split(id, "/"); len(parts) == 3 {
|
||||||
|
|
||||||
cloudFuncIdRegex := regexp.MustCompile("^([a-z0-9-]+)/([a-z0-9-])+/([a-zA-Z0-9_-]{1,63})$")
|
|
||||||
|
|
||||||
if cloudFuncIdRegex.MatchString(id) {
|
|
||||||
return &cloudFunctionId{
|
return &cloudFunctionId{
|
||||||
Project: parts[0],
|
Project: parts[0],
|
||||||
Region: parts[1],
|
Region: parts[1],
|
||||||
|
Loading…
Reference in New Issue
Block a user