Skip to content

Commit

Permalink
Add CloudTasksQueue resource
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
Ty Larrabee authored and modular-magician committed Nov 12, 2019
1 parent 98362f3 commit f050433
Show file tree
Hide file tree
Showing 6 changed files with 1,092 additions and 2 deletions.
3 changes: 3 additions & 0 deletions google-beta/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ type Config struct {
CloudFunctionsBasePath string
CloudRunBasePath string
CloudSchedulerBasePath string
CloudTasksBasePath string
ComputeBasePath string
ContainerAnalysisBasePath string
DataFusionBasePath string
Expand Down Expand Up @@ -219,6 +220,7 @@ var CloudBuildDefaultBasePath = "https://cloudbuild.googleapis.com/v1/"
var CloudFunctionsDefaultBasePath = "https://cloudfunctions.googleapis.com/v1/"
var CloudRunDefaultBasePath = "https://run.googleapis.com/v1alpha1/"
var CloudSchedulerDefaultBasePath = "https://cloudscheduler.googleapis.com/v1/"
var CloudTasksDefaultBasePath = "https://cloudtasks.googleapis.com/v2/"
var ComputeDefaultBasePath = "https://www.googleapis.com/compute/beta/"
var ContainerAnalysisDefaultBasePath = "https://containeranalysis.googleapis.com/v1beta1/"
var DataFusionDefaultBasePath = "https://datafusion.googleapis.com/v1beta1/"
Expand Down Expand Up @@ -708,6 +710,7 @@ func ConfigureBasePaths(c *Config) {
c.CloudFunctionsBasePath = CloudFunctionsDefaultBasePath
c.CloudRunBasePath = CloudRunDefaultBasePath
c.CloudSchedulerBasePath = CloudSchedulerDefaultBasePath
c.CloudTasksBasePath = CloudTasksDefaultBasePath
c.ComputeBasePath = ComputeDefaultBasePath
c.ContainerAnalysisBasePath = ContainerAnalysisDefaultBasePath
c.DataFusionBasePath = DataFusionDefaultBasePath
Expand Down
14 changes: 12 additions & 2 deletions google-beta/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,14 @@ func Provider() terraform.ResourceProvider {
"GOOGLE_CLOUD_SCHEDULER_CUSTOM_ENDPOINT",
}, CloudSchedulerDefaultBasePath),
},
"cloud_tasks_custom_endpoint": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: validateCustomEndpoint,
DefaultFunc: schema.MultiEnvDefaultFunc([]string{
"GOOGLE_CLOUD_TASKS_CUSTOM_ENDPOINT",
}, CloudTasksDefaultBasePath),
},
"compute_custom_endpoint": {
Type: schema.TypeString,
Optional: true,
Expand Down Expand Up @@ -482,9 +490,9 @@ func Provider() terraform.ResourceProvider {
return provider
}

// Generated resources: 100
// Generated resources: 101
// Generated IAM resources: 39
// Total generated resources: 139
// Total generated resources: 140
func ResourceMap() map[string]*schema.Resource {
resourceMap, _ := ResourceMapWithErrors()
return resourceMap
Expand Down Expand Up @@ -515,6 +523,7 @@ func ResourceMapWithErrors() (map[string]*schema.Resource, error) {
"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(),
"google_compute_autoscaler": resourceComputeAutoscaler(),
"google_compute_backend_bucket": resourceComputeBackendBucket(),
Expand Down Expand Up @@ -804,6 +813,7 @@ func providerConfigure(d *schema.ResourceData, terraformVersion string) (interfa
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)
config.ContainerAnalysisBasePath = d.Get("container_analysis_custom_endpoint").(string)
config.DataFusionBasePath = d.Get("data_fusion_custom_endpoint").(string)
Expand Down
Loading

0 comments on commit f050433

Please sign in to comment.