Skip to content

Commit

Permalink
Change max dispatches from int to double
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
chrisst committed Jan 14, 2020
1 parent f01bb32 commit 4ed357f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
10 changes: 2 additions & 8 deletions google/resource_cloud_tasks_queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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.
Expand Down Expand Up @@ -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
}

Expand Down
1 change: 0 additions & 1 deletion google/resource_sql_database_instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/cloud_tasks_queue.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 4ed357f

Please sign in to comment.