Skip to content
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_eventhub - fix capture feature not being set issue #19836

Merged
merged 1 commit into from
Jan 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions internal/services/eventhub/eventhub_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ func resourceEventHubUpdate(d *pluginsdk.ResourceData, meta interface{}) error {
PartitionCount: utils.Int64(int64(d.Get("partition_count").(int))),
MessageRetentionInDays: utils.Int64(int64(d.Get("message_retention").(int))),
Status: &eventhubStatus,
CaptureDescription: expandEventHubCaptureDescription(d),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this always need to be set for an update? i.e. if nil is sent, is the value removed from the resource? (Which would indicate a bug in the service?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried using the api directly, the value would be removed if I didn't include this property. I think it makes sense since we are not explicitly setting it when sending the request.

To answer your questions, if we set the value to nil, the value will be removed as well, doesn't it sounds an expected behavior to you? feel free to let me know your concerns. :)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

},
}

Expand Down