https://pulumi.com logo
#aws
Title
# aws
a

astonishing-quill-88807

08/06/2020, 3:41 PM
So, I've got a cloudfront distribution and associated Route53 record that need to be replaced, but it's failing on the distribution because the Route53 record is already present. Any thoughts on how I can force it to remove the Route53 record before recreating the Cloudfront distribution? Relevant code here: https://github.com/mitodl/ol-infrastructure/blob/main/src/ol_infrastructure/infrastructure/aws/s3_sites/__main__.py#L17-L26
b

billowy-army-68599

08/06/2020, 4:24 PM
i might be misunderstanding this, but maybe try setting
deleteBeforeReplace
and
dependsOn
together? it should delete the record first https://www.pulumi.com/docs/intro/concepts/programming-model/#deletebeforereplace if that doesn't work, you might need to use some custom await logic, I'm not sure how to do that with python