diff --git a/google/resource_cloudfunctions_function.go b/google/resource_cloudfunctions_function.go index 7d736533..e498f9d6 100644 --- a/google/resource_cloudfunctions_function.go +++ b/google/resource_cloudfunctions_function.go @@ -27,10 +27,6 @@ var functionAllowedMemory = map[int]bool{ 2048: true, } -// For now CloudFunctions are allowed only in the following locations. -// Please see https://cloud.google.com/about/locations/ -var validCloudFunctionRegion = validation.StringInSlice([]string{"us-central1", "us-east1", "europe-west1", "asia-northeast1"}, true) - const functionDefaultAllowedMemoryMb = 256 type cloudFunctionId struct { @@ -283,11 +279,10 @@ func resourceCloudFunctionsFunction() *schema.Resource { }, "region": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - ValidateFunc: validCloudFunctionRegion, + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, }, }, } @@ -305,14 +300,6 @@ func resourceCloudFunctionsCreate(d *schema.ResourceData, meta interface{}) erro if err != nil { return err } - // We do this extra validation here since most regions are not valid, and the - // error message that Cloud Functions has for "wrong region" is not specific. - // Provider-level region fetching skips validation, because it's not possible - // for the provider-level region to know about the field-level validator. - _, errs := validCloudFunctionRegion(region, "region") - if len(errs) > 0 { - return errs[0] - } cloudFuncId := &cloudFunctionId{ Project: project,