https://pulumi.com logo
#aws
Title
# aws
n

nutritious-pager-34892

03/13/2020, 8:54 PM
Hello, while testing a container example from https://www.pulumi.com/containers/ I get this error: ” error: Error creating application Load Balancer: ValidationError: At least two subnets in two different Availability Zones must be specified”
w

white-balloon-205

03/14/2020, 12:08 AM
Which example was it that had problems for you? Which region were you deploying to?
n

nutritious-pager-34892

03/16/2020, 1:29 AM
@white-balloon-205 I appreciate your response. I tested so many variations since then that I kind of feel defeated by Pulumi, I’m not certain where I was. I’m currently exploring aws-cdk as a remedy because there were so many orphaned resources while using Pulumi. If I come back around to pulumi I’ll try and refresh myself about this question. I’m in us-west-1 btw and was testing a private only ecs fargate container.
w

white-balloon-205

03/16/2020, 4:51 PM
Sorry about the problems - would love to help unblock you here!
I’m in us-west-1 btw
It's possible that was a part of the problem, I know that region is very constrained. Note that the error you reported here is from AWS, not Pulumi, so I'd be a little surprised if it wasn't a problem trying to create an ALB using other technologies (assuming you were creating the same kind of VPC and ALB in each).
there were so many orphaned resources while using Pulumi
This is very unexpected. Nothing should get orphaned in Pulumi unless you hard interrupt a deployment (multiple ctrl-c), and even then Pulumi should warn you about "pending operations" and ask you to reconcile before continuing. Do you have any more details on what led you to seeing orphaned resources?
n

nutritious-pager-34892

03/16/2020, 9:36 PM
I think a lot of orphaning I experienced has to do with having a VPC underlying them and it failing to be removed because of being attached to another resource not being removed, for example, testing a stack up and down is tolerable until I add in Elasticache on same VPC then It’s just not practical to test with, etc. So I learned I have to leave that resource up, which means not creating a VPC layer and basically manually creating one.
I currently found more confidence with AWS-CDK because it creates cloud formation templates to do its work and it has so far rolledback gracefully and cleaned up gracefully. Does Pulumi generate those for updates?
Also AWS-CDK let’s me add commands to ec2 userdata for provisioning servers which I find to be more reliable then using SSH to connect to a machine and do that.
I guess somebody else said no about CF templates and to use it to create them directly.. that seems to defeat why I would use Pulumi as a higherlevel language..
And btw that Pulumi typescript provisioner example is broken, I pinged @gentle-diamond-70147 - so I ended up blocked and so far have had much more success with aws-cdk.
g

gentle-diamond-70147

03/17/2020, 4:43 AM
Hey @nutritious-pager-34892, I'm sorry for the trouble you're having. If you're open to it, I'd be happy to hop on a call with you and talk through these items. I'll DM you.