terraform-google-scheduled-function icon indicating copy to clipboard operation
terraform-google-scheduled-function copied to clipboard

Support for max_instances argument

Open fpoon opened this issue 3 years ago • 2 comments

TL;DR

Hi, It seems that this module lacks support for cloud function max_instances argument, though the underlying event-function module seems to support it. Adding this would protect users against unlimited scaling in case of pubsub malfunction (e.g. constant failing to acknowledge message and redelivering it, which might result in increasing number of cloud function instances)

Terraform Resources

No response

Detailed design

main.tf:
...
module "main" {
  ...
  max_instances = var.function_max_instances
  ...
}
...

variables.tf:
...
variable "function_max_intances" {
  type        = number
  default     = 0
  description = "The maximum number of parallel executions of the function."
}
...

Additional information

If you are ok with this proposal, I'll be happy to contribute code :)

fpoon avatar Dec 28 '21 14:12 fpoon

@fpoon happy to review a PR adding this

bharathkkb avatar Feb 04 '22 03:02 bharathkkb

Hi, here's the PR: https://github.com/terraform-google-modules/terraform-google-scheduled-function/pull/67

fpoon avatar Feb 14 '22 16:02 fpoon

Completed in: https://github.com/terraform-google-modules/terraform-google-scheduled-function/pull/67

apeabody avatar May 22 '24 16:05 apeabody