To read from app settings (or environment variables) using %<key>% should do the trick. In K8s, you would have to configure all key-value pairs in a ConfigMap as container environment variables for them to be picked up.
How can we pass topic and subscription name from yaml in azure function - java
I want to fetch subscriptionName value from deployment.yaml , config map settings. How can I get the value from there.
@FunctionName("TestHandler")
public void Handler(
@ServiceBusTopicTrigger(
name = "ServiceBus",
topicName = "topicname",
connection = "ServiceBusConnectionString",
subscriptionName = "subscriptionName")
String message,
final ExecutionContext context) {}
I tried passing value of subscriptionName as subscriptionName = "%MY_SUBSCRIPTION_CONFIG%" . But that doesn't take value from yaml
@Gaurav Mantri could you please suggest
1 answer
Sort by: Most helpful
-
Pramod Valavala 20,611 Reputation points Microsoft Employee
2021-02-15T13:00:34.76+00:00