diff --git a/terraform/templates/cloud-init.tpl b/terraform/templates/cloud-init.tpl
index 983a4a3c3269ab5fbc67d2e516c5a97123b338c4..a307a28ee3e3eaed241d0e9232c68411a935de46 100644
--- a/terraform/templates/cloud-init.tpl
+++ b/terraform/templates/cloud-init.tpl
@@ -37,7 +37,7 @@ EOF
 
 # Disable systemd-resolved for CoreDNS
 systemctl disable --now systemd-resolved
-rm /etc/resolv.conf
+rm -f /etc/resolv.conf
 systemctl restart NetworkManager
 
 reboot