-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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_scheduled_query_rules_alert
& azurerm_monitor_scheduled_query_rules_log
#5053
Conversation
- Fix some sprintf formatting - Improve documentation for cross-resource query - Don't create an empty metric_trigger {} if user doesn't specify block
I think I'm all good now and ready for review. Thanks! |
@tombuildsstuff @katbyte would be great to have it 1.39.0 release ;) |
NY present maybe in this time 🙏 |
@katbyte as i understood from tagging it will be merged in current 1.42 release cycle? |
- Fix test crash - Move common functions to helpers - Add more schema validations - Add Update tests
I'm going to do a once over on everything again this weekend, but I think it's close enough for re-review. Thanks! |
I do see one issue that I'll try and address as soon as I can. The LogToMetric tests and example don't reflect what's required to make that useful: To use the LogToMetric API, there needs to be a second resource, an Azure Metric Alert, that alerts on the newly-created metric. I'll update the tests and example to reflect this. |
- Add metric alerts to LogToMetric tests and docs - Fix type assert from change to TypeList - Fix a couple typos
Presuming this test passes, I'm ready for another review. Thanks! |
Oops - I found one additional published limit - 100 resources maximum for a cross-resource query: |
@tombuildsstuff @mbfrahry @katbyte Just checking in since this is my first new resource PR. Is there anything else I should be doing to make sure it is mergeable to master? I'll be patient, just want to be able to streamline any requirements if possible. Thanks for all your work on 2.0! |
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.
Hey @mcdafydd. Tests are passing! I've left a few things to maneuver around to ease maintainability and a couple more around ease of reading for the docs but I think we're just about there
azurerm/internal/services/monitor/tests/data_source_monitor_scheduled_query_rules_alert_test.go
Outdated
Show resolved
Hide resolved
website/docs/r/monitor_scheduled_query_rules_alert.html.markdown
Outdated
Show resolved
Hide resolved
- Improve docs - Use heredoc strings in docs and test queries - Move shared functions into monitor package - Add underscores to test function names
@mbfrahry Ready for another peek. |
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.
LGTM!
azurerm_monitor_scheduled_query_rules_alert
& azurerm_monitor_scheduled_query_rules_log
Thanks for this @mcdafydd! We'll get it into the next release! |
This has been released in version 2.1.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.1.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 👉 [email protected]. Thanks! |
Fixes #3951
This feature implements the ScheduledQueryRules API. The new resources should allow users to automate creation of monitoring and alerting rules alongside infrastructure.