https://pulumi.com logo
Title
a

aloof-grass-44583

11/27/2020, 2:12 AM
Hey guys, running into issue while creating records for a web server. The domain name is getting suffixed when the record is created and preventing proper routing. When deployed the record ends up with mydomain.com-suffix. I've referenced the docs and see that the 'name' property can be used to lock down the resource name but it seems to overlap with the record name param. I'm using the python sdk and for reference here is my record resource:
a_record = aws.route53.Record("a",
                              zone_id=hosted_zone.zone_id,
                              name="<http://mydomain.com|mydomain.com>",
                              type="A",
                              ttl=30,
                              records=[server.public_ip])
l

little-cartoon-10569

11/27/2020, 2:19 AM
That's odd, for most resources the auto-suffixing is turned off when you specify the name argument..
a

aloof-grass-44583

11/27/2020, 2:22 AM
That was my understanding based on https://www.pulumi.com/docs/intro/concepts/programming-model/#autonaming. I'm still new to Pulumi so hoping I'm just misunderstanding.
l

little-cartoon-10569

11/27/2020, 2:29 AM
Those docs are confusing.. docs say "type" must be "PRIMARY" or "SECONDARY", but the examples and the code require that it's a record type ("A", "AAAA" etc.).
I see that alias records are supposed to use the "aliases" property rather than the "records" property. Would that be worth trying? https://www.pulumi.com/docs/reference/pkg/aws/route53/record/#alias-record
a

aloof-grass-44583

11/27/2020, 3:38 AM
Figured it out. It was because the hosted zone wasn't explicitly named. Realized this after noticing all the suffixes were the same... Oops. Thanks for help though 🙂
👍 1