Skip to content

Commit f08a0a4

Browse files
authored
feat: add function max instances argument (#66) (#67)
1 parent 01c160c commit f08a0a4

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ Then perform the following commands on the root folder:
4646
| function\_environment\_variables | A set of key/value environment variable pairs to assign to the function. | `map(string)` | `{}` | no |
4747
| function\_event\_trigger\_failure\_policy\_retry | A toggle to determine if the function should be retried on failure. | `bool` | `false` | no |
4848
| function\_labels | A set of key/value label pairs to assign to the function. | `map(string)` | `{}` | no |
49+
| function\_max\_instances | The maximum number of parallel executions of the function. | `number` | `0` | no |
4950
| function\_name | The name to apply to the function | `string` | n/a | yes |
5051
| function\_runtime | The runtime in which the function will be executed. | `string` | `"nodejs10"` | no |
5152
| function\_service\_account\_email | The service account to run the function as. | `string` | `""` | no |

main.tf

+1
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ module "main" {
8383
labels = var.function_labels
8484
service_account_email = var.function_service_account_email
8585
timeout_s = var.function_timeout_s
86+
max_instances = var.function_max_instances
8687
vpc_connector = var.vpc_connector
8788
vpc_connector_egress_settings = var.vpc_connector_egress_settings
8889
}

variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,12 @@ variable "function_service_account_email" {
110110
description = "The service account to run the function as."
111111
}
112112

113+
variable "function_max_instances" {
114+
type = number
115+
default = 0
116+
description = "The maximum number of parallel executions of the function."
117+
}
118+
113119
variable "vpc_connector" {
114120
type = string
115121
default = null

0 commit comments

Comments
 (0)