-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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_activity_log_alert: support properties.recommendationType
#7458
azurerm_monitor_activity_log_alert: support properties.recommendationType
#7458
Conversation
…nType` for recommendation alerts
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 for the PR @magodo, overall looks good but we have a failing test:
TestAccAzureRMMonitorActivityLogAlert_basicAndCompleteUpdate: testing.go:640: Step 1 error: errors during apply:
Error: Error creating or updating activity log alert "acctestActivityLogAlert-200624031619256159" (resource group "acctestRG-200624031619256159"): insights.ActivityLogAlertsClient#CreateOrUpdate: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="ConditionValueInvalid" Message="Invalid value [email protected] for condition caller"
@katbyte The test also failed in master branch. The cause is that I complement those into the schema, also fixed the test. Test Result💤 via 🦉 v1.14.4 make testacc TEST=./azurerm/internal/services/monitor/tests TESTARGS='-run TestAccAzureRMMonitorActivityLogAlert_'
==> Checking that code complies with gofmt requirements...
==> Checking that Custom Timeouts are used...
==> Checking that acceptance test packages are used...
TF_ACC=1 go test ./azurerm/internal/services/monitor/tests -v -run TestAccAzureRMMonitorActivityLogAlert_ -timeout 180m -ldflags="-X=github.com/terraform-providers/terraform-provider-azurerm/version.ProviderVersion=acc"
=== RUN TestAccAzureRMMonitorActivityLogAlert_basic
=== PAUSE TestAccAzureRMMonitorActivityLogAlert_basic
=== RUN TestAccAzureRMMonitorActivityLogAlert_requiresImport
=== PAUSE TestAccAzureRMMonitorActivityLogAlert_requiresImport
=== RUN TestAccAzureRMMonitorActivityLogAlert_singleResource
=== PAUSE TestAccAzureRMMonitorActivityLogAlert_singleResource
=== RUN TestAccAzureRMMonitorActivityLogAlert_complete
=== PAUSE TestAccAzureRMMonitorActivityLogAlert_complete
=== RUN TestAccAzureRMMonitorActivityLogAlert_basicAndCompleteUpdate
=== PAUSE TestAccAzureRMMonitorActivityLogAlert_basicAndCompleteUpdate
=== CONT TestAccAzureRMMonitorActivityLogAlert_basic
=== CONT TestAccAzureRMMonitorActivityLogAlert_basicAndCompleteUpdate
=== CONT TestAccAzureRMMonitorActivityLogAlert_singleResource
=== CONT TestAccAzureRMMonitorActivityLogAlert_complete
=== CONT TestAccAzureRMMonitorActivityLogAlert_requiresImport
--- PASS: TestAccAzureRMMonitorActivityLogAlert_basic (110.98s)
--- PASS: TestAccAzureRMMonitorActivityLogAlert_requiresImport (121.56s)
--- PASS: TestAccAzureRMMonitorActivityLogAlert_basicAndCompleteUpdate (215.16s)
--- PASS: TestAccAzureRMMonitorActivityLogAlert_singleResource (237.28s)
--- PASS: TestAccAzureRMMonitorActivityLogAlert_complete (238.26s)
PASS
ok github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/monitor/tests 238.295s |
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 - thanks for this @magodo
dismissing since changes have been pushed
This has been released in version 2.16.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.16.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! |
azurerm_monitor_activity_log_alert: support
properties.recommendationType
for recommendation alerts.There is no document for this field, but via inspecting the API flow in portal, the mode is like below:
The id can be got from
azurerm_advisor_recommendation
data source or by other means.(fix: #7300)