Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cloudrun v1 #4972

Merged
merged 1 commit into from
Nov 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions google/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ type Config struct {
BinaryAuthorizationBasePath string
CloudBuildBasePath string
CloudFunctionsBasePath string
CloudRunBasePath string
CloudSchedulerBasePath string
CloudTasksBasePath string
ComputeBasePath string
Expand Down Expand Up @@ -206,6 +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 CloudSchedulerDefaultBasePath = "https://cloudscheduler.googleapis.com/v1/"
var CloudTasksDefaultBasePath = "https://cloudtasks.googleapis.com/v2/"
var ComputeDefaultBasePath = "https://www.googleapis.com/compute/v1/"
Expand Down Expand Up @@ -673,6 +675,7 @@ func ConfigureBasePaths(c *Config) {
c.BinaryAuthorizationBasePath = BinaryAuthorizationDefaultBasePath
c.CloudBuildBasePath = CloudBuildDefaultBasePath
c.CloudFunctionsBasePath = CloudFunctionsDefaultBasePath
c.CloudRunBasePath = CloudRunDefaultBasePath
c.CloudSchedulerBasePath = CloudSchedulerDefaultBasePath
c.CloudTasksBasePath = CloudTasksDefaultBasePath
c.ComputeBasePath = ComputeDefaultBasePath
Expand Down
15 changes: 13 additions & 2 deletions google/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,14 @@ func Provider() terraform.ResourceProvider {
"GOOGLE_CLOUD_FUNCTIONS_CUSTOM_ENDPOINT",
}, CloudFunctionsDefaultBasePath),
},
"cloud_run_custom_endpoint": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: validateCustomEndpoint,
DefaultFunc: schema.MultiEnvDefaultFunc([]string{
"GOOGLE_CLOUD_RUN_CUSTOM_ENDPOINT",
}, CloudRunDefaultBasePath),
},
"cloud_scheduler_custom_endpoint": {
Type: schema.TypeString,
Optional: true,
Expand Down Expand Up @@ -445,9 +453,9 @@ func Provider() terraform.ResourceProvider {
return provider
}

// Generated resources: 84
// Generated resources: 86
// Generated IAM resources: 39
// Total generated resources: 123
// Total generated resources: 125
func ResourceMap() map[string]*schema.Resource {
resourceMap, _ := ResourceMapWithErrors()
return resourceMap
Expand Down Expand Up @@ -475,6 +483,8 @@ func ResourceMapWithErrors() (map[string]*schema.Resource, error) {
"google_cloudfunctions_function_iam_binding": ResourceIamBinding(CloudFunctionsCloudFunctionIamSchema, CloudFunctionsCloudFunctionIamUpdaterProducer, CloudFunctionsCloudFunctionIdParseFunc),
"google_cloudfunctions_function_iam_member": ResourceIamMember(CloudFunctionsCloudFunctionIamSchema, CloudFunctionsCloudFunctionIamUpdaterProducer, CloudFunctionsCloudFunctionIdParseFunc),
"google_cloudfunctions_function_iam_policy": ResourceIamPolicy(CloudFunctionsCloudFunctionIamSchema, CloudFunctionsCloudFunctionIamUpdaterProducer, CloudFunctionsCloudFunctionIdParseFunc),
"google_cloud_run_domain_mapping": resourceCloudRunDomainMapping(),
"google_cloud_run_service": resourceCloudRunService(),
"google_cloud_scheduler_job": resourceCloudSchedulerJob(),
"google_cloud_tasks_queue": resourceCloudTasksQueue(),
"google_compute_address": resourceComputeAddress(),
Expand Down Expand Up @@ -733,6 +743,7 @@ func providerConfigure(d *schema.ResourceData, terraformVersion string) (interfa
config.BinaryAuthorizationBasePath = d.Get("binary_authorization_custom_endpoint").(string)
config.CloudBuildBasePath = d.Get("cloud_build_custom_endpoint").(string)
config.CloudFunctionsBasePath = d.Get("cloud_functions_custom_endpoint").(string)
config.CloudRunBasePath = d.Get("cloud_run_custom_endpoint").(string)
config.CloudSchedulerBasePath = d.Get("cloud_scheduler_custom_endpoint").(string)
config.CloudTasksBasePath = d.Get("cloud_tasks_custom_endpoint").(string)
config.ComputeBasePath = d.Get("compute_custom_endpoint").(string)
Expand Down
Loading