This message was deleted.
# aws
s
This message was deleted.
l
You can skip most of those apply() calls, by using the equivalent getXOutput() functions. But you would be better off creating your own VPC and subnets, and using the known new values when creating your cluster. Looking up existing resources like this exposes you to the risk of them being deleted under you, and having to manually re-create them.
g
kk, I was using the existing one because I was getting an error about hitting the maximum public ip addresses. I assume I can delete the default vpc if I am not using it and then I shouldn't hit the 5 public IP cap.
l
You shouldn't need any public IP addresses: what use-case requires those?
g
I would think I would have a public IP to the nginx ingress controller which would then point to the 2 micro services based on path. (I am more of a software developer than infrastructure so I am out of my depth).
l
Conventionally, those are provided by a load balancer. Providing direct internet access to your web server is not recommended.
g
So here is my full index.ts that I originally had (that creates the vpc). When I run a pulumi up I get the error below: https://www.dropbox.com/scl/fi/l7ikc87intnrvsnu51avj/index.ts?rlkey=1aihbeykzl00vs21qzttz4diy&dl=0
Copy code
aws:ec2:Eip (ticketing-vpc-1):
    error: 1 error occurred:
        * creating EC2 EIP: AddressLimitExceeded: The maximum number of addresses has been reached.
        status code: 400, request id: 3ff6b08a-a85c-45cd-8022-af0221bbc3f2
l
That code looks reasonable. The error message says you're using too many EIPs (as opposed to static public IP addresses, which was my previous assumption). This won't be affected by using different VPCs: this is an account-wide limit. I think perhaps there's a small limit when you use the free tier. You can check your EIPs in the AWS VPC console, "Elastic IPs". You shouldn't need more than two per account, under normal circumstances; perhaps you have some old ones created when experimenting?
1
Maybe two per account is a bit small 🙂 One per region you intend to have a load balancer in!