-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Event Grid Trigger #302
Event Grid Trigger #302
Conversation
sdk/nodejs/eventhub/zMixins.ts
Outdated
opts); | ||
|
||
const keys = pulumi.output(this.functionApp.getHostKeys()); | ||
const key = keys.apply(keys => keys.systemKeys["eventgrid_extension"]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be able to write this as: keys.systemKeys["eventgrid_extension"]
:)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does that work? I thought I can't dot into an Output
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, we added this back in 0.17: https://www.pulumi.com/blog/simplified-outputs-in-pulumi-0.17.0/
sdk/nodejs/eventhub/zMixins.ts
Outdated
return new EventGridCallbackSubscription( | ||
name, { id: this.id, resourceGroupName: this.name }, | ||
args, { parent: this, ...opts }); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm on the fence about this. How core do you think this functionality is? Do people listen to resource group events a lot? I ask since i think of ResourceGroup as a very core type, and it feels like a slightly strange one-off coupling between ResourceGroup and EventGrid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no idea, probably not too much. I've never used it before, but thought it's a decent use case. What's the alternative?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as an example, for awsx we decided to invert this for things like metrics. Instead of exposing off the resources, you can just go into each package and work with the metrics. I somewhat feel like this should be gotten through the eventgrid module and you can say "i'd like the event grid events for these N different resource types".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you give an example of a call that you have in mind? EventGrid.onResouceGroup(resrouceGroup, {...})
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you give an example of a call that you have in mind?
EventGrid.onResouceGroup(resrouceGroup, {...})?
Right. it could even be a top level module function. like eventGrid.onResourceGroupEvent
. It might be in a sub-module. For example, in awsx, we do this:
awsx.cognito.metrics.compromisedCredentialsRisk(...)
.
So i'd be interested in exploring:
azure.eventhub.onResourceGroupGridEvent(...)
or
azure.eventhub.events.onResourceGroupdGridEvent(...)
.
@@ -635,7 +635,7 @@ export class EventGridCallbackSubscription<T> extends appservice.EventSubscripti | |||
opts); | |||
|
|||
const keys = pulumi.output(this.functionApp.getHostKeys()); | |||
const key = keys.apply(keys => keys.systemKeys["eventgrid_extension"]); | |||
const key = keys.systemKeys["eventgrid_extension"]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Thanks! |
Support Event Grid as Azure Functions trigger, specifically
See the new example for API.
Covers most of #295.