Skip to content

Commit

Permalink
Cloudrun v1
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
chrisst authored and modular-magician committed Nov 25, 2019
1 parent c2e94bc commit 197d35f
Show file tree
Hide file tree
Showing 12 changed files with 3,812 additions and 18 deletions.
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: 83
// Generated resources: 85
// Generated IAM resources: 39
// Total generated resources: 122
// Total generated resources: 124
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 @@ -732,6 +742,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

0 comments on commit 197d35f

Please sign in to comment.