https://pulumi.com logo
r

rich-easter-89163

07/08/2019, 6:28 PM
Hi fokls! I'm trying to create an
aws.route53.Record
but it creates a sufixed record (e.g my-api-<RANDOM_IDENTIFIER>.mysite.com) which is wrong, I created it according the docs (https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/aws/route53/#alias-record) and I don't see an option to create it without the sufix, my code is almost the same of the docs:
Copy code
new aws.route53.Record('my-api', {
    aliases: [
      {
        evaluateTargetHealth: false,
        name: loadBalancer.dnsName,
        zoneId: loadBalancer.zoneId,
      },
    ],
    type: aws.route53.RecordTypes.A,
    zoneId: zone.zoneId,
  });
Any clues on it?
g

gentle-diamond-70147

07/08/2019, 6:29 PM
This is due to the auto-naming feature within Pulumi - https://www.pulumi.com/docs/reference/programming-model/#autonaming.
b

broad-dog-22463

07/08/2019, 6:30 PM
Yessir, can you try this please:
Copy code
new aws.route53.Record('my-api', {
    name: "my-api'",
    aliases: [
      {
        evaluateTargetHealth: false,
        name: loadBalancer.dnsName,
        zoneId: loadBalancer.zoneId,
      },
    ],
    type: aws.route53.RecordTypes.A,
    zoneId: zone.zoneId,
  });
r

rich-easter-89163

07/08/2019, 6:30 PM
Yeah, but for dns records doesn't make sense to me @gentle-diamond-70147
b

broad-dog-22463

07/08/2019, 6:31 PM
@rich-easter-89163 we can override the name with the code block above
r

rich-easter-89163

07/08/2019, 6:31 PM
triyin' @broad-dog-22463
It worked, thanks @broad-dog-22463
b

broad-dog-22463

07/08/2019, 6:41 PM
👍
as @gentle-diamond-70147 said, we have autonaming but we can override that