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
dry-keyboard-94795
04/26/2024, 1:45 PM
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
dry-keyboard-94795
04/26/2024, 1:46 PM
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
No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.