File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ module "localhost_function" {
6363| event\_ trigger\_ failure\_ policy\_ retry | A toggle to determine if the function should be retried on failure. | bool | ` "false" ` | no |
6464| ingress\_ settings | The ingress settings for the function | string | ` "ALLOW_ALL" ` | no |
6565| labels | A set of key/value label pairs to assign to the Cloud Function. | map(string) | ` <map> ` | no |
66+ | max\_ instances | The maximum number of parallel executions of the function. | number | ` "0" ` | no |
6667| name | The name to apply to any nameable resources. | string | n/a | yes |
6768| project\_ id | The ID of the project to which resources will be applied. | string | n/a | yes |
6869| region | The region in which resources will be applied. | string | n/a | yes |
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ data "null_data_source" "wait_for_files" {
4444data "archive_file" "main" {
4545 type = " zip"
4646 output_path = pathexpand (" ${ var . source_directory } .zip" )
47- source_dir = " ${ data . null_data_source . wait_for_files . outputs [" source_dir" ]} "
47+ source_dir = data. null_data_source . wait_for_files . outputs [" source_dir" ]
4848}
4949
5050resource "google_storage_bucket" "main" {
@@ -71,6 +71,7 @@ resource "google_cloudfunctions_function" "main" {
7171 name = var. name
7272 description = var. description
7373 available_memory_mb = var. available_memory_mb
74+ max_instances = var. max_instances
7475 timeout = var. timeout_s
7576 entry_point = var. entry_point
7677 ingress_settings = var. ingress_settings
Original file line number Diff line number Diff line change @@ -88,6 +88,12 @@ variable "timeout_s" {
8888 description = " The amount of time in seconds allotted for the execution of the function."
8989}
9090
91+ variable "max_instances" {
92+ type = number
93+ default = 0
94+ description = " The maximum number of parallel executions of the function."
95+ }
96+
9197variable "bucket_labels" {
9298 type = map (string )
9399 default = {}
You can’t perform that action at this time.
0 commit comments