@luckow not sure if that is the right expectation, you have to use env vars. Password is just one or the many config vars of an addon. Addons can change because of user actions. For example, a user changes the SMTP addon address, user changes internal ports of an addon, user changes oidc scopes etc.
In many PaaS setups, they will cycle passwords periodically, so hard-coding will never work even if you don't move instance in the long run. The behavior is the same in all app deployment platforms - heroku, DO app. See https://devcenter.heroku.com/articles/add-ons#config-var-values-can-change for some rationale.