Skip to content

Commit fca0381

Browse files
takaaa220joehan
andauthored
Add ingress settings support in firebase functions (#2924)
Co-authored-by: joehan <[email protected]>
1 parent 67cff84 commit fca0381

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/deploy/functions/release.js

+2
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ module.exports = function (context, options, payload) {
262262
vpcConnector: functionInfo.vpcConnector,
263263
vpcConnectorEgressSettings: functionInfo.vpcConnectorEgressSettings,
264264
serviceAccountEmail: functionInfo.serviceAccountEmail,
265+
ingressSettings: functionInfo.ingressSettings,
265266
})
266267
.then((createRes) => {
267268
if (_.has(functionTrigger, "httpsTrigger")) {
@@ -311,6 +312,7 @@ module.exports = function (context, options, payload) {
311312
vpcConnector: functionInfo.vpcConnector,
312313
vpcConnectorEgressSettings: functionInfo.vpcConnectorEgressSettings,
313314
serviceAccountEmail: functionInfo.serviceAccountEmail,
315+
ingressSettings: functionInfo.ingressSettings,
314316
environmentVariables: _.assign(
315317
{},
316318
existingFunction.environmentVariables,

src/gcp/cloudfunctions.js

+7
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ function _createFunction(options) {
9999
if (options.serviceAccountEmail) {
100100
data.serviceAccountEmail = options.serviceAccountEmail;
101101
}
102+
if (options.ingressSettings) {
103+
data.ingressSettings = options.ingressSettings;
104+
}
102105

103106
return api
104107
.request("POST", endpoint, {
@@ -205,6 +208,10 @@ function _updateFunction(options) {
205208
data.serviceAccountEmail = options.serviceAccountEmail;
206209
masks.push("serviceAccountEmail");
207210
}
211+
if (options.ingressSettings) {
212+
data.ingressSettings = options.ingressSettings;
213+
masks.push("ingressSettings");
214+
}
208215
if (options.trigger.eventTrigger) {
209216
masks = _.concat(
210217
masks,

0 commit comments

Comments
 (0)