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_monitor_action_group - fix method to check exactly one of event_hub_id or (event_hub_namespace, event_hub_name) must be set in event_hub_receiver #21735

Merged
merged 2 commits into from
May 10, 2023

Conversation

teowa
Copy link
Contributor

@teowa teowa commented May 10, 2023

In #17335 the event_hub_id is deprecated in favor of event_hub_namespace, event_hub_name, all of the 3 field is marked as optional and computed. But there is bug to check the exactly one of of these properties. This PR uses the d.GetRawConfig() to check the exactly one of.

test:

TF_ACC=1 go test -v ./internal/services/monitor -parallel 20 -test.run=TestAccMonitorActionGroup_event -timeout 1440m -ldflags="-X=github.com/hashicorp/terraform-provider-azurerm/version.ProviderVersion=acc"
=== RUN   TestAccMonitorActionGroup_eventHubReceiver
=== PAUSE TestAccMonitorActionGroup_eventHubReceiver
=== CONT  TestAccMonitorActionGroup_eventHubReceiver
--- PASS: TestAccMonitorActionGroup_eventHubReceiver (283.59s)
PASS
ok      github.com/hashicorp/terraform-provider-azurerm/internal/services/monitor       283.629s

resolves #20146

Copy link
Member

@mbfrahry mbfrahry left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @teowa

@mbfrahry mbfrahry added this to the v3.56.0 milestone May 10, 2023
@mbfrahry mbfrahry merged commit 86f1010 into hashicorp:main May 10, 2023
12 checks passed
mbfrahry added a commit that referenced this pull request May 10, 2023
@github-actions
Copy link

This functionality has been released in v3.56.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error: in event_hub_receiver, exactly one of event_hub_id or (event_hub_namespace, event_hub_name) must be set
2 participants