For a GCP VM (RHEL-7) I have configured (added to custom metadata section on GCP console under startup-script key) scripts like:
echo "Welcome"