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

New Resource: azurerm_monitor_data_collection_rule #17342

Merged
merged 14 commits into from
Jul 19, 2022

Conversation

teowa
Copy link
Contributor

@teowa teowa commented Jun 22, 2022

Support for new resource azurerm_monitor_data_collection_rule.
Reference:

  1. Data Collection Rule
  2. REST API .

TF_ACC=1 go test -v ./internal/services/monitor -run=TestAccMonitorDataCollectionRule_ -timeout 60m -ldflags="-X=github.com/hashicorp/terraform-provider-azurerm/version.ProviderVersion=acc"
=== RUN   TestAccMonitorDataCollectionRule_basic
=== PAUSE TestAccMonitorDataCollectionRule_basic
=== RUN   TestAccMonitorDataCollectionRule_requiresImport
=== PAUSE TestAccMonitorDataCollectionRule_requiresImport
=== RUN   TestAccMonitorDataCollectionRule_update
=== PAUSE TestAccMonitorDataCollectionRule_update
=== RUN   TestAccMonitorDataCollectionRule_complete
=== PAUSE TestAccMonitorDataCollectionRule_complete
=== CONT  TestAccMonitorDataCollectionRule_basic
=== CONT  TestAccMonitorDataCollectionRule_update
=== CONT  TestAccMonitorDataCollectionRule_complete
=== CONT  TestAccMonitorDataCollectionRule_requiresImport
--- PASS: TestAccMonitorDataCollectionRule_basic (193.64s)
--- PASS: TestAccMonitorDataCollectionRule_requiresImport (205.91s)
--- PASS: TestAccMonitorDataCollectionRule_complete (211.10s)
--- PASS: TestAccMonitorDataCollectionRule_update (457.91s)
PASS
ok      github.com/hashicorp/terraform-provider-azurerm/internal/services/monitor       457.969s

(fixes #9679)

@tombuildsstuff
Copy link
Contributor

@teowa can you please update this to use the SDK here: https://github.com/hashicorp/go-azure-sdk/tree/main/resource-manager/insights/2021-04-01 - rather than embedding this within this repository? Thanks!

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.

Hi @teowa. Thanks for taking the time to write this PR out. It looks good but generics aren't something we're looking to add to the provider quite yet. Once that is removed, we should be good to get this in

@teowa teowa requested a review from mbfrahry July 8, 2022 08:51
@teowa teowa requested a review from katbyte July 11, 2022 02:53
…ent' in log_analytic_workspace need to be explicitly specified in future API version
@teowa
Copy link
Contributor Author

teowa commented Jul 12, 2022

Find a previous PR of Data Collection Rule: #16704 made by @ms-henglu , thanks to him, he has confirmed with service team that receiving ofMicrosoft-WindowsEvent streams in Log Analytic Workspace must be explicitly enabled (using azurerm_log_analytics_solution ) in the future API version(2021-09-01-preview or later). To be consistent, I have added azurerm_log_analytics_solution in acctest and docs like what does in heng's PR

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!

@mbfrahry mbfrahry added this to the v3.15.0 milestone Jul 19, 2022
@mbfrahry mbfrahry merged commit 4146eda into hashicorp:main Jul 19, 2022
mbfrahry added a commit that referenced this pull request Jul 19, 2022
@github-actions
Copy link

This functionality has been released in v3.15.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!

@github-actions
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 Aug 25, 2022
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.

Support for Azure Monitor Data Collection Rules
4 participants