pulumi / pulumi-cloud

A highly productive multi-cloud framework for containers, serverless, and data
Apache License 2.0
133 stars 19 forks source link

lambda is not launching in VPC #822

Closed msidd closed 3 months ago

msidd commented 1 year ago

What happened?

I trying to deploy a very simple API* in AWS (goal is to eventualy launch in Azure as well) i am following this

I have provided cloud-aws:externalSecurityGroups cloud-aws:externalSubnets: cloud-aws:externalVpcId:

When launching the api for aws , it does not attach lambda with VPC

Example

here is my index.js

let endpoint = new cloud.API("telemetry");
endpoint.post("/telemetry", (req, res) => {

    res.status(200).json({ hello:'word'});
});

exports.endpoint = endpoint.publish().url;

Output of pulumi about

CLI
Version 3.78.1 Go Version go1.20.7 Go Compiler gc

Plugins NAME VERSION aws 5.42.0 awsx 1.0.5 docker 3.6.1 nodejs unknown

Host
OS darwin Version 13.5 Arch x86_64

This project is written in nodejs: executable='/usr/local/bin/node' version='v18.17.1'

Current Stack: mygithub/telemetry-app/dev

Found no resources associated with dev

Found no pending operations associated with dev

Backend
Name pulumi.com URL https://app.pulumi.com/mygithub User mygithub Organizations mygithub

Dependencies: NAME VERSION @pulumi/awsx 1.0.5 @pulumi/cloud-aws 0.40.2 @pulumi/cloud 0.40.2 @pulumi/pulumi 3.83.0 kafkajs 2.2.4 @pulumi/aws 5.42.0

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

mjeffryes commented 6 months ago

Thanks for your patience here; curious if you were able to make any further progress with the external VPC? I noticed from the code here: https://github.com/pulumi/pulumi-cloud/blob/5d145cdc0c4dee86f1712d789bb80592c845af20/aws/shared.ts#L138 that you also need to provide cloud-aws:externalPublicSubnets in your config for an external VPC.