Describe the bug
I have a application that will listen for EventGridEvent. I don't want to "hardcode" the evengridtopic to use. I want to use %variable% syntax like for other triggers (look at CosmosDBOutput, _
Suppose that I want to deploy the same application but they will monitor different Topics , it will be easy to change the value in function.json.
But now, I'll have to clone the repository and change the name "hardcoded in EventGridTrigger(name="topic1") -> EventGridTrigger(name="topic2").. It doesn't make sense, unless I missed something and there a way to do that.
Exception or Stack Trace
[2022-11-24T13:09:14.376Z] The 'blobStorageEventGridTrigger' function is in error: The binding name %EventGridTopic% is invalid. Please assign a valid name to the binding.
Code Snippet
here my code
@FunctionName("blobStorageEventGridTrigger")
public void execute(
@EventGridTrigger(
name = "%EventGridTopic%")
EventSchema content,
final ExecutionContext context) {
LOGGER.info("Java Event Grid trigger function executed. EventSchema:[{}]", content);
handleRequest(content, context);
}
in local.settings.json
...
"EventGridTopic": "blobeventtopic",
....
if I change to code to
@FunctionName("blobStorageEventGridTrigger")
public void execute(
@EventGridTrigger(
//name = "%EventGridTopic%")
name = "blobeventtopic")
EventSchema content,
final ExecutionContext context) {
LOGGER.info("Java Event Grid trigger function executed. EventSchema:[{}]", content);
handleRequest(content, context);
}
the application will run
Functions:
blobStorageEventGridTrigger: eventGridTrigger
For detailed output, run func with --verbose flag.
[2022-11-24T13:24:42.794Z] Worker process started and initialized.
[2022-11-24T13:24:47.387Z] Host lock lease acquired by instance ID '000000000000000000000000A69F7E4C'.
Expected behavior
I expect to be able to set the topic name to listen with configuration using %% syntax
Setup (please complete the following information):
Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
hi, Team. Could you please help to take a look at this issue?
Copy from https://github.com/Azure/azure-sdk-for-java/issues/32326.
Describe the bug I have a application that will listen for EventGridEvent. I don't want to "hardcode" the evengridtopic to use. I want to use %variable% syntax like for other triggers (look at CosmosDBOutput, _
like
Suppose that I want to deploy the same application but they will monitor different Topics , it will be easy to change the value in function.json.
But now, I'll have to clone the repository and change the name "hardcoded in EventGridTrigger(name="topic1") -> EventGridTrigger(name="topic2").. It doesn't make sense, unless I missed something and there a way to do that.
Exception or Stack Trace [2022-11-24T13:09:14.376Z] The 'blobStorageEventGridTrigger' function is in error: The binding name %EventGridTopic% is invalid. Please assign a valid name to the binding.
Code Snippet here my code
in local.settings.json
if I change to code to
the application will run
Expected behavior I expect to be able to set the topic name to listen with configuration using %% syntax
Setup (please complete the following information):
Information Checklist Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report