Hey :wave:, how to get the lost of records of an A...
# general
b
Hey 👋, how to get the lost of records of an AWS Route53 hosted zone? I'm trying to create an AWS ACM Certificate that has some alternative names, validated by DNS. The process is that the Pulumi AWS plugin tries to create CNAME records in the given domain name's Route53 hosted zone for the certificate's domain name and all its alternative names. During this process, I need to verify that if a CNAME record with the same name already exists in the corresponding Route53 hosted zone; otherwise, the Pulumi program fails. How can I get the list of existing records an a Route53 hosted zone, so I can verify if the record I'm trying to create is a duplicate or not?
d
Detecting ahead of time isn't generally supported, as after the stack creates the record, it'll be detected as being created, so subsequent calls will remove the record
You can use
allowOverwrite
though. Would only recommend this if the existing records are just manually created instead of managed in other pulumi stacks, as the record will be adopted into your stack
b
That's great to know
allowOverwrite
. You save me 🤌