https://pulumi.com logo
Title
a

ancient-cricket-42076

12/23/2021, 8:21 PM
Hello again, I've been wrestling with an Elastic Beanstalk deploy lately and I ran into this issue, what I'm wondering is where I can attach (under what namespace) the subnets is asking for, and, do I need to do two times the namespace or put the subnets on a list?
Creating load balancer failed Reason: At least two subnets in two different Availability Zones must be specified (Service: AmazonElasticLoadBalancing; Status Code: 400; Error Code: ValidationError; Request ID: 7cc7ae7e-17dc-4361-8fec-8b0b0bb5df96; Proxy: null)
l

little-cartoon-10569

12/23/2021, 8:26 PM
Are you creating your own shared load balancer and providing it to the elasticbeanstalk Environment, or using one that elasticbeanstalk creates for you?
a

ancient-cricket-42076

12/23/2021, 8:28 PM
aws.elasticbeanstalk.EnvironmentAllSettingArgs(                 namespace="aws:elasticbeanstalk:environment",                  name="LoadBalancerType",
                    value="application)
Only configuring the EB provides
l

little-cartoon-10569

12/23/2021, 8:31 PM
elasticbeanstalk allows you to use a shared load balancer, which makes this very easy and reduces costs, but is initially more difficult to set up.
Or it can create the LB for you.
If you've got a multi-instance Environment and a non-shared load balancer, I would imagine that the LB uses the same subnets as your application. So hopefully you just need to pass in an array of 2 private subnets, 1 in each AZ.
All the examples I'm finding are single-instance though 😞
a

ancient-cricket-42076

12/23/2021, 8:34 PM
An array then?, I'll try something and see what comes up, I appreciate your time to help me 🙏
l

little-cartoon-10569

12/23/2021, 8:34 PM
The code in the doc page only uses a string, but an array makes more sense to me. The AWS docs all seem to use the console for everything... 😠
a

ancient-cricket-42076

12/27/2021, 5:33 PM
Forgot to answer what happened in this case, for anyone who runs into the same issue: if you're attaching Subnets on the enviroment settings of a EB, it's just
value="subnet-1","subnet-2"
👍 1