Skip to content

Commit

Permalink
Add support for cloud run service IAM. Use base paths via replaceVars
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
slevenick authored and modular-magician committed Dec 5, 2019
1 parent 92ff367 commit 21a38f4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions google/cloudrun_domain_mapping.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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,
},
Expand Down
6 changes: 3 additions & 3 deletions google/cloudrun_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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,
},
Expand Down
2 changes: 1 addition & 1 deletion google/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
Expand Down

0 comments on commit 21a38f4

Please sign in to comment.