diff --git a/CHANGELOG.md b/CHANGELOG.md index 26b7aa6..ee13df9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +### Added + +- `FunctionConfig.requestConcurrency` option for GCP gen2 functions, mapped to `serviceConfig.maxInstanceRequestConcurrency`. Lets functions serve more than one request per instance (defaults to 1 currently). + ## [5.2.0](https://github.com/Space48/cloud-seed/compare/v5.1.0...v5.2.0) ### Added diff --git a/package-lock.json b/package-lock.json index d8c0921..bb42c6e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@space48/cloud-seed", - "version": "5.1.0", + "version": "5.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@space48/cloud-seed", - "version": "5.1.0", + "version": "5.2.0", "license": "MIT", "dependencies": { "arg": "^5.0.2", diff --git a/stacks/gcp/GcpStack.ts b/stacks/gcp/GcpStack.ts index 1780a20..dcb9381 100644 --- a/stacks/gcp/GcpStack.ts +++ b/stacks/gcp/GcpStack.ts @@ -167,6 +167,7 @@ export default class GcpStack extends TerraformStack { timeoutSeconds: func.timeout ?? 60, maxInstanceCount: func.maxInstances, minInstanceCount: func.minInstances, + maxInstanceRequestConcurrency: func.requestConcurrency, environmentVariables, ...(func.vpc?.network || func.vpc?.subnet ? { diff --git a/types/runtime.ts b/types/runtime.ts index 4119ec9..83d00e7 100644 --- a/types/runtime.ts +++ b/types/runtime.ts @@ -20,6 +20,7 @@ export type FunctionConfig = { }; maxInstances?: number; minInstances?: number; + requestConcurrency?: number; version?: string; };