I have an AWS Application Load Balancer (stored in...
# aws
r
I have an AWS Application Load Balancer (stored in variable
alb
) that I am dynamically creating a Route53 DNS record from.
alb.loadBalancer.dnsName
produces
dualstack.$RESOURCE_NAME-xxxxxxxxxx.$<http://REGION.elb.amazonaws.com|REGION.elb.amazonaws.com>
, where
xxxxxxxxxx
is a random string of numbers. Is there a way to strip the random string of numbers from the resource name? I set the
name
property on the Pulumi ALB resource, which removed Pulumi's unique suffix, but not the numbers Or am I looking at this the wrong way? My issue/goal here is to keep a static record value to avoid DNS propagation downtime (which can be very long)
d
I believe (but really not 100%) that those are from AWS. Are those numbers the same as the Pulumi suffix?
b
Yes those values are aws randomisation. You can’t turn it off
r
Thanks guys, that makes sense, and I understand why they randomize it -- how do people normally go about avoiding DNS propagation downtime when upgrading the record pointing to a newly-deployed ALB?
d
Why do you need to replace the ALB? Is that a one time thing?
It wouldn’t be a part of a regular deploy process, right?
One point of the ALB is being able to swap what’s attached to it, vs needing to do stuff with DNS
r
I may be doing something wrong, but every time I update the container image on a fargate service, the ECS
TaskDefinition
and
Service
change (as expected), which causes the
alb.loadBalancer.dnsName
output to change. Causing the
A
record pointing to that DNS name to be out of sync for a while
The only Pulumi diff is the ECS resources (task definition & service)
I'll keep debugging, I'm sure it's just an issue with my code. Your point about ALB being static makes sense and is what I expected to be the case originally so I must have some implicit dependency somewhere. Thanks for your thoughts and help!
d
Good luck! Sorry I can’t be of more help!
r
You helped a ton man I was going crazy over the ALB thing and appreciate you verifying how it's supposed to work 😂
p
(I think I was looking at the listener, not the alb…)
r
Haha no worries! Did you get it figured out? Btw as a side note, this problem "magically" went away for me which kind of concerns me but it hasn't come up since
p
I don’t know yet - wading my way through the requirements right now to see if I’ve got everything in place 🙂
Right now it’s giving me an error saying that the ttl is required even though it’s present on the parameters…
Ah, it wasn’t supposed to be present… obviously… seems like it might have worked, so… onwards and upwards!