It sounds like the
PREFECT_PROFILE_PATH and
PREFECT_LOGGING_SETTINGS_PATH settings might be what you want.
You could set them as environment variables on a deployment. One thing to watch out for is if you're using a process worker to run deployments. By default, it will create a temporary directory to run your flow, making it difficult to choose a settings directory ahead of time. If it works for your use case, you could set the
working directory on the worker to get around this.
I know that's not
quite setting them at runtime; but using these env vars makes it easy to use different profile and logging config files from one deployment run to the next