diff --git a/google/cloudrun_domain_mapping.go b/google/cloudrun_domain_mapping.go index 6afdc3c0e7..250dd565d1 100644 --- a/google/cloudrun_domain_mapping.go +++ b/google/cloudrun_domain_mapping.go @@ -20,7 +20,7 @@ import ( ) func GetCloudRunDomainMappingCaiObject(d TerraformResourceData, config *Config) (Asset, error) { - name, err := assetName(d, config, "//cloudrun.googleapis.com/domains.cloudrun.com/v1/namespaces/{{project}}/domainmappings/{{name}}") + name, err := assetName(d, config, "//cloudrun.googleapis.com/apis/domains.cloudrun.com/v1/namespaces/{{project}}/domainmappings/{{name}}") if err != nil { return Asset{}, err } @@ -29,8 +29,8 @@ func GetCloudRunDomainMappingCaiObject(d TerraformResourceData, config *Config) Name: name, Type: "cloudrun.googleapis.com/DomainMapping", Resource: &AssetResource{ - Version: "apis", - DiscoveryDocumentURI: "https://www.googleapis.com/discovery/v1/apis/cloudrun/apis/rest", + Version: "{{location}}-run.googleapis.com", + DiscoveryDocumentURI: "https://www.googleapis.com/discovery/v1/apis/cloudrun/{{location}}-run.googleapis.com/rest", DiscoveryName: "DomainMapping", Data: obj, }, diff --git a/google/cloudrun_service.go b/google/cloudrun_service.go index fa624f9ce5..37348164ff 100644 --- a/google/cloudrun_service.go +++ b/google/cloudrun_service.go @@ -17,7 +17,7 @@ package google import "reflect" func GetCloudRunServiceCaiObject(d TerraformResourceData, config *Config) (Asset, error) { - name, err := assetName(d, config, "//cloudrun.googleapis.com/serving.knative.dev/v1/namespaces/{{project}}/services/{{name}}") + name, err := assetName(d, config, "//cloudrun.googleapis.com/apis/serving.knative.dev/v1/namespaces/{{project}}/services/{{name}}") if err != nil { return Asset{}, err } @@ -26,8 +26,8 @@ func GetCloudRunServiceCaiObject(d TerraformResourceData, config *Config) (Asset Name: name, Type: "cloudrun.googleapis.com/Service", Resource: &AssetResource{ - Version: "apis", - DiscoveryDocumentURI: "https://www.googleapis.com/discovery/v1/apis/cloudrun/apis/rest", + Version: "{{location}}-run.googleapis.com", + DiscoveryDocumentURI: "https://www.googleapis.com/discovery/v1/apis/cloudrun/{{location}}-run.googleapis.com/rest", DiscoveryName: "Service", Data: obj, }, diff --git a/google/config.go b/google/config.go index da68cc37ec..df975c6d08 100644 --- a/google/config.go +++ b/google/config.go @@ -207,7 +207,7 @@ var BigtableDefaultBasePath = "https://bigtableadmin.googleapis.com/v2/" var BinaryAuthorizationDefaultBasePath = "https://binaryauthorization.googleapis.com/v1/" var CloudBuildDefaultBasePath = "https://cloudbuild.googleapis.com/v1/" var CloudFunctionsDefaultBasePath = "https://cloudfunctions.googleapis.com/v1/" -var CloudRunDefaultBasePath = "https://{{location}}-run.googleapis.com/apis/" +var CloudRunDefaultBasePath = "https://{{location}}-run.googleapis.com/" var CloudSchedulerDefaultBasePath = "https://cloudscheduler.googleapis.com/v1/" var CloudTasksDefaultBasePath = "https://cloudtasks.googleapis.com/v2/" var ComputeDefaultBasePath = "https://www.googleapis.com/compute/v1/"