Is there a way to check if `/etc/foo.conf` exists

How do we handle a case where we have a conf file in /etc/foo.conf will sometimes exist, but sometimes not exist? Is there a way to specify in a layout to only bind-file if the file exists

Your layout points to a writable snap directory and you would additionally need a system-files interface to access the file in /etc …

If the file is small enough you can use a command-chain script to compare them at app startup and copy the one from /etc over the layout if needed, else the default one you shipped originally is used.