Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions platform/src/components/aws/vpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -680,14 +680,17 @@ export class Vpc extends Component implements Link.Linkable {
self.registerOutputs({
_tunnel: all([
self.bastionInstance,
self.elasticIps,
self.privateKeyValue,
self._privateSubnets,
self._publicSubnets,
]).apply(
([bastion, privateKeyValue, privateSubnets, publicSubnets]) => {
([bastion, elasticIps, privateKeyValue, privateSubnets, publicSubnets]) => {
if (!bastion) return;
return {
ip: bastion.publicIp,
ip: natInstances.apply((instances) =>
instances.length ? elasticIps[0]?.publicIp : bastion.publicIp,
),
Comment on lines +691 to +693
Copy link

@danielsharvey danielsharvey Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Should this be self.instances and included inthe all()? I think the static get case is affected.
  2. I do not think this handles the case where NAT Eip's are specified (https://sst.dev/docs/component/aws/vpc/#nat-ip)
  3. I suggest we add a comment to clarify the managed NAT case (Export elastic ip for tunnel when present. #5820 (comment)) - this is not clear from the code. Actually, more than that - why are the Elastic IPs created in the managed NAT case? And further, this will break the static get case.

username: "ec2-user",
privateKey: privateKeyValue!,
subnets: [...privateSubnets, ...publicSubnets].map(
Expand Down