-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
azurerm_kusto_eventhub_data_connection: support event_system_properties #11006
azurerm_kusto_eventhub_data_connection: support event_system_properties #11006
Conversation
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 @favoretti aside from a couple comments this is looking good
@@ -83,6 +83,16 @@ func resourceKustoEventHubDataConnection() *schema.Resource { | |||
ValidateFunc: eventhubValidate.EventHubID, | |||
}, | |||
|
|||
"event_system_properties": { |
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.
event seems very vague here? as it applies to the eventhub:
"event_system_properties": { | |
"eventhub_system_properties": { |
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.
It does apply to eventhub, but those are properties of a single event as far as I understand, not of eventhub on its own.
@derSchtefan since you originally requested this, can you chip in on semantics please? :)
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.
These appear to be (System) Events - so the naming event_system_properties
would make more sense than eventhub_system_properties
here: https://docs.microsoft.com/en-us/azure/data-explorer/ingest-data-event-hub-overview#event-system-properties-mapping
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.
then perhaps system_event_properties
? 🤔 docs will need to be updated either way as it currently states: a list of system properties for the Event Hub.
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.
@katbyte @favoretti EventHub and IoT Hub are based around Kafka, a similar open-source system. EventHub and IoT Hub both attach different SYSTEM properties to their events, that Kafka does not know about. One of them is x-opt-publisher which in conjunction with SAS token locked publisher endpoints allow you to identify who published an event (which is a nightmare to identify and make secure otherwise)
The property should be named event_system_properties
because:
- Microsoft names them like this not only in the portal but also the json schema
- They are not specific to EventHub, but also include IoT Hub system properties
- They are system properties of the event, as opposed to custom properties of the event
The list of potential event_system_properties
can be found here:
- For EventHub based ingestions: https://docs.microsoft.com/en-us/azure/data-explorer/ingest-data-event-hub-overview#event-system-properties-mapping
- For IoT hub based ingestions: https://docs.microsoft.com/en-us/azure/data-explorer/ingest-data-iot-hub-overview#system-properties
IoT and EventHub both are mapped to EventHub ingestion internally, and work the same, since IoT hub is just an EventHub with some extra features. Other EventHub based systems might be added in the future.
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.
See also @tombuildsstuff 's comment here: #11006 (comment)
Co-authored-by: kt <kt@katbyte.me>
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.
Left a couple of comments inline but this otherwise LGTM 👍
"event_system_properties": { | ||
Type: schema.TypeList, | ||
Optional: true, | ||
Computed: true, |
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.
does this need to be Computed?
Computed: true, |
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.
Yep, since some of them are set implicitly and generated a diff otherwise.
@@ -83,6 +83,16 @@ func resourceKustoEventHubDataConnection() *schema.Resource { | |||
ValidateFunc: eventhubValidate.EventHubID, | |||
}, | |||
|
|||
"event_system_properties": { |
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.
These appear to be (System) Events - so the naming event_system_properties
would make more sense than eventhub_system_properties
here: https://docs.microsoft.com/en-us/azure/data-explorer/ingest-data-event-hub-overview#event-system-properties-mapping
This has been released in version 2.53.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example: provider "azurerm" {
version = "~> 2.53.0"
}
# ... other configuration ... |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks! |
Fixes #10993