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

Add resource health to azurerm_monitor_activity_log_alert #14917

Merged
merged 4 commits into from
Feb 16, 2022

Conversation

tj-spyro
Copy link
Contributor

Add resource health to azurerm_monitor_activity_log_alert

Fixes #9391

@tj-spyro
Copy link
Contributor Author

@katbyte - comments resolved, ready for another review

Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

Thanks @tj-spyro - couple small comments on docs and some test failures:

------- Stdout: -------
=== RUN   TestAccMonitorActivityLogAlert_ResourceHealth_basicAndUpdate
=== PAUSE TestAccMonitorActivityLogAlert_ResourceHealth_basicAndUpdate
=== CONT  TestAccMonitorActivityLogAlert_ResourceHealth_basicAndUpdate
    testcase.go:110: Step 1/6 error: After applying this test step and performing a `terraform refresh`, the plan was not empty.
        stdout
        
        
        Terraform used the selected providers to generate the following execution
        plan. Resource actions are indicated with the following symbols:
          ~ update in-place
        
        Terraform will perform the following actions:
        
          # azurerm_monitor_activity_log_alert.test will be updated in-place
          ~ resource "azurerm_monitor_activity_log_alert" "test" {
                id                  = "/subscriptions/*******/resourceGroups/acctestRG-220202220513688243/providers/Microsoft.Insights/activityLogAlerts/acctestActivityLogAlert-220202220513688243"
                name                = "acctestActivityLogAlert-220202220513688243"
                tags                = {}
                # (4 unchanged attributes hidden)
        
        
              ~ criteria {
                    # (1 unchanged attribute hidden)
        
                  ~ resource_health {
                      ~ current  = [
                          + "Degraded",
                          + "Unavailable",
                        ]
                      ~ previous = [
                          + "Available",
                          + "Unknown",
                        ]
                        # (1 unchanged attribute hidden)
                    }
                }
                # (2 unchanged blocks hidden)
            }
        
        Plan: 0 to add, 1 to change, 0 to destroy.
--- FAIL: TestAccMonitorActivityLogAlert_ResourceHealth_basicAndUpdate (211.98s)
FAIL

website/docs/r/monitor_activity_log_alert.html.markdown Outdated Show resolved Hide resolved
website/docs/r/monitor_activity_log_alert.html.markdown Outdated Show resolved Hide resolved
@tj-spyro tj-spyro force-pushed the monitor-alert-resource-health branch from 22f512e to 7be6628 Compare February 11, 2022 15:15
@tj-spyro
Copy link
Contributor Author

@katbyte, sorry for the delay in getting the changes made. Should be good now

Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

Thanks @tj-spyro - LGTM now 🚀

@katbyte katbyte merged commit be26ef1 into hashicorp:main Feb 16, 2022
@github-actions github-actions bot added this to the v2.97.0 milestone Feb 16, 2022
katbyte added a commit that referenced this pull request Feb 16, 2022
stephybun pushed a commit that referenced this pull request Feb 16, 2022
Add resource health to azurerm_monitor_activity_log_alert

Fixes #9391
stephybun pushed a commit that referenced this pull request Feb 16, 2022
@github-actions
Copy link

This functionality has been released in v2.97.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 Mar 21, 2022
@tj-spyro tj-spyro deleted the monitor-alert-resource-health branch September 2, 2024 21:27
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 granular alert conditon when setting resource health alert with terraform
2 participants