Skip to content

Commit b389e5d

Browse files
author
Leon Radley
committed
Add support for 4GB memory option
The 4GB memory option was not added everywhere. Fixes firebase#834
1 parent c69c9bc commit b389e5d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/cloud-functions.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,7 @@ export function optionsToTrigger(options: DeploymentOptions) {
507507
'512MB': 512,
508508
'1GB': 1024,
509509
'2GB': 2048,
510+
'4GB': 4096,
510511
};
511512
trigger.availableMemoryMb = _.get(memoryLookup, options.memory);
512513
}

src/function-builder.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ export function region(
144144
* Configure runtime options for the function.
145145
* @param runtimeOptions Object with optional fields:
146146
* 1. `memory`: amount of memory to allocate to the function, possible values
147-
* are: '128MB', '256MB', '512MB', '1GB', and '2GB'.
147+
* are: '128MB', '256MB', '512MB', '1GB', '2GB', and '4GB'.
148148
* 2. `timeoutSeconds`: timeout for the function in seconds, possible values are
149149
* 0 to 540.
150150
* 3. `failurePolicy`: failure policy of the function, with boolean `true` being
@@ -188,7 +188,7 @@ export class FunctionBuilder {
188188
* Configure runtime options for the function.
189189
* @param runtimeOptions Object with optional fields:
190190
* 1. `memory`: amount of memory to allocate to the function, possible values
191-
* are: '128MB', '256MB', '512MB', '1GB', and '2GB'.
191+
* are: '128MB', '256MB', '512MB', '1GB', '2GB', and '4GB'.
192192
* 2. `timeoutSeconds`: timeout for the function in seconds, possible values are
193193
* 0 to 540.
194194
* 3. `failurePolicy`: failure policy of the function, with boolean `true` being

0 commit comments

Comments
 (0)