I found the solution by googling “cloud-init overwriting resolv.conf”
; Created by cloud-init on instance boot automatically, do not edit.
The file I was looking for all along was “vi /etc/network/interfaces”
Generated by the DigitalOcean provisioning process on 2019-01-16T08:48:42Z
See ‘man interfaces’ on a Debian/Ubuntu systems.
iface lo inet loopback
dns-nameservers 188.8.131.52 184.108.40.206
This article is not the fix but relevant and helpful.
Title: Red Hat Enterprise Linux RHEL6 - How Does the resolv.conf File Get Changed on Boot
Document Type: Support Information
Original owner: KCS - Linux
Disclosure level: Public
FACT:The file /etc/sysconfig/network-scripts/ifcfg-ethx has a parameter PEERDNS = yes
SYMPTOM:The file /etc/resolv.conf is changed on boot.
CAUSE:Parameters used in the network configuration files can be used to change the resolver configuration, when the network is started.
FIX:The ifcfg parameter PEERDNS determines if the file /etc/resolv.conf file is modified or not. If it is set to a yes then the parameters DOMAIN, DNS1 and DNS2 will be used to set search and nameservers entries in the file /etc/resolv.conf. If PEERDNS is set to no then the file /etc/resolv.conf is not modified.
The script /etc/sysconfig/network-scripts/ifup-post performs any changes to resolv.conf.
So these lines added to the file /etc/sysconfig/network-scripts/ifcfg-eth0.
Will result in the following /etc/resolv.conf file.
You would want to limit these parameters to only one ifcfg-ethx file. If you have multiple DNSx and DOMAIN parameters in different files the resolv.conf you get would be based on the last interface that was brought up.
PEERDNS defaults to no unless DHCP is used, in which case it defaults to yes.