Open grahambunce opened 3 years ago
@grahambunce, are you still experiencing the issue?
@alrod I assume the problem still exists as it seems to be a flaw/feature of the way azure functions configure themselves.
However I personally am no longer impacted by this because we gave up and stopped using azure functions in docker as they were too opinionated on how they should work.
in the end we created a simple background worker in a container that did the same thing and gave us total flexibility instead.
This doesn’t mean the problem has gone away and this should be closed though as I expect the scenario and the resulting problem is still valid and should be resolved for future users.
I'm trying to run an AzureFunction Service Bus Trigger in docker. The connection property is set on an Environment variable in startup in the docker file and the credentials needed are passed when creating the container (though eventually these need to be picked up at runtime from within the app as these will be held in Hashicorp Vault
The connection string as a whole really needs to be dynamic too as the service bus namespace is different per environment, but I can't seem to make that dynamic yet as if the configuration setting doesn't exist then the service will fail to start at all - that is part 2 of the same problem, namely:
How to dynamically configure Azure Service Bus Trigger connections at runtime?
i.e.
Dockerfile
In the startup.cs
When the host starts in docker I get the a 401 unauthenticated error when trying to get messages of the service bus. I think because it hasn't picked up the updated credentials and modified connection string from startup.csy
Is there a way to dynamically set the connection string and credentials at runtime?