Skip to content

Commit b36700f

Browse files
steveohjoehan
andauthored
Resolve vpc value prior to checking it's value (#6332)
* fix: resolve vpc value prior to checking it's value closes #6327 * chore: correct endpoint resolution * style: correct linting * fix: do not overwrite entire object --------- Co-authored-by: joehan <[email protected]>
1 parent b7c8383 commit b36700f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/deploy/functions/build.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,10 +494,12 @@ export function toBackend(
494494
nullsafeVisitor((cpu) => (cpu === "gcf_gen1" ? cpu : r.resolveInt(cpu)))
495495
);
496496
if (bdEndpoint.vpc) {
497+
bdEndpoint.vpc.connector = params.resolveString(bdEndpoint.vpc.connector, paramValues);
497498
if (bdEndpoint.vpc.connector && !bdEndpoint.vpc.connector.includes("/")) {
498499
bdEndpoint.vpc.connector = `projects/${bdEndpoint.project}/locations/${region}/connectors/${bdEndpoint.vpc.connector}`;
499500
}
500-
bkEndpoint.vpc = { connector: params.resolveString(bdEndpoint.vpc.connector, paramValues) };
501+
502+
bkEndpoint.vpc = { connector: bdEndpoint.vpc.connector };
501503
proto.copyIfPresent(bkEndpoint.vpc, bdEndpoint.vpc, "egressSettings");
502504
} else if (bdEndpoint.vpc === null) {
503505
bkEndpoint.vpc = null;

0 commit comments

Comments
 (0)