So, I've got a cloudfront distribution and associa...
# aws
a
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
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