From 4ed357feb05ab47248b0736a8efa3639b07ec4fb Mon Sep 17 00:00:00 2001 From: Chris Stephens Date: Mon, 13 Jan 2020 23:23:46 +0000 Subject: [PATCH] Change max dispatches from int to double Signed-off-by: Modular Magician --- google/resource_cloud_tasks_queue.go | 10 ++-------- google/resource_sql_database_instance_test.go | 1 - website/docs/r/cloud_tasks_queue.html.markdown | 2 +- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/google/resource_cloud_tasks_queue.go b/google/resource_cloud_tasks_queue.go index c887a1d9eb6..938f73a0930 100644 --- a/google/resource_cloud_tasks_queue.go +++ b/google/resource_cloud_tasks_queue.go @@ -96,7 +96,7 @@ By default, the task is sent to the version which is the default version when th Type: schema.TypeList, Computed: true, Optional: true, - Description: `Rate limits for task dispatches. + Description: `Rate limits for task dispatches. The queue's actual dispatch rate is the result of: @@ -118,7 +118,7 @@ reached, Cloud Tasks stops dispatching tasks until the number of concurrent requests decreases.`, }, "max_dispatches_per_second": { - Type: schema.TypeInt, + Type: schema.TypeFloat, Computed: true, Optional: true, Description: `The maximum rate at which tasks are dispatched from this queue. @@ -456,12 +456,6 @@ func flattenCloudTasksQueueRateLimits(v interface{}, d *schema.ResourceData) int return []interface{}{transformed} } func flattenCloudTasksQueueRateLimitsMaxDispatchesPerSecond(v interface{}, d *schema.ResourceData) interface{} { - // Handles the string fixed64 format - if strVal, ok := v.(string); ok { - if intVal, err := strconv.ParseInt(strVal, 10, 64); err == nil { - return intVal - } // let terraform core handle it if we can't convert the string to an int. - } return v } diff --git a/google/resource_sql_database_instance_test.go b/google/resource_sql_database_instance_test.go index 069037b74f2..11c939db0d2 100644 --- a/google/resource_sql_database_instance_test.go +++ b/google/resource_sql_database_instance_test.go @@ -10,7 +10,6 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/terraform" - sqladmin "google.golang.org/api/sqladmin/v1beta4" ) diff --git a/website/docs/r/cloud_tasks_queue.html.markdown b/website/docs/r/cloud_tasks_queue.html.markdown index 8d70a0e8238..640facc5af4 100644 --- a/website/docs/r/cloud_tasks_queue.html.markdown +++ b/website/docs/r/cloud_tasks_queue.html.markdown @@ -65,7 +65,7 @@ The following arguments are supported: * `rate_limits` - (Optional) - Rate limits for task dispatches. + Rate limits for task dispatches. The queue's actual dispatch rate is the result of: * Number of tasks in the queue * User-specified throttling: rateLimits, retryConfig, and the queue's state.