-
Notifications
You must be signed in to change notification settings - Fork 248
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
feat(alert_muting_rule): Add action_on_muting_rule_window_ended
attribute in newrelic_alert_muting_rule
Terraform Resource
#2783
Open
Aashirwadjain
wants to merge
12
commits into
main
Choose a base branch
from
muting-rule-end-behaviour
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
63f96f3
feat(alert-muting-rule): add end_behaviour attribute to muting rule s…
Aashirwadjain 57456e6
feat(alert-muting-rule): add end_behaviour attribute to create/update…
Aashirwadjain 7ff91ed
feat(alert-muting-rule): add newrelic-client-go commit as dependency …
Aashirwadjain 8e35db1
feat(alert-muting-rule): update end_behaviour attribute to action_on_…
Aashirwadjain f7a1410
feat(alert-muting-rule): remove expandMutingRuleEndBehaviour and impl…
Aashirwadjain 470f47a
feat(alert-muting-rule): add validation on action_on_muting_rule_wind…
Aashirwadjain 7581c4d
feat(alert-muting-rule): add actionOnMutingRuleWindowEnded attribute …
Aashirwadjain 15800e0
feat(alert-muting-rule): add action_on_muting_rule_window_ended attri…
Aashirwadjain c25bc36
feat(alert-muting-rule): add example usage for action_on_muting_rule_…
Aashirwadjain a5c696c
feat(alert-muting-rule): add actionOnMutingRuleWindowEnded to testAcc…
Aashirwadjain f62a74b
feat(alert-muting-rule): add TestAccNewRelicAlertMutingRule_EndBehavi…
Aashirwadjain e3a9b3e
feat(alert-muting-rule): update validation on action_on_muting_rule_w…
Aashirwadjain File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -42,6 +42,7 @@ resource "newrelic_alert_muting_rule" "foo" { | |||||
weekly_repeat_days = ["MONDAY", "WEDNESDAY", "FRIDAY"] | ||||||
repeat_count = 42 | ||||||
} | ||||||
action_on_muting_rule_window_ended = "CLOSE_ISSUES_ON_INACTIVE" | ||||||
} | ||||||
``` | ||||||
|
||||||
|
@@ -54,7 +55,7 @@ The following arguments are supported: | |||||
* `name` - The name of the MutingRule. | ||||||
* `description` - The description of the MutingRule. | ||||||
* `schedule` - (Optional) Specify a schedule for enabling the MutingRule. See [Schedule](#schedule) below for details | ||||||
|
||||||
* `action_on_muting_rule_window_ended` - (Optional) The action when the muting rule window is ended or disabled. Valid values are `CLOSE_ISSUES_ON_INACTIVE`, `DO_NOTHING` | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
just a |
||||||
|
||||||
### Nested `condition` blocks | ||||||
|
||||||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@vagrawal-newrelic @Aashirwadjain this is nice, but the attribute doesn't need to be
Computed
for this to happen since the read function is anyway being called in create; you can just have this condition.The only thing to double check is that since this is coming from an enum in client go, if there is no value returned from the API for this attribute, is an empty string effectively being sent to Terraform from the Go Client via this attribute and saved as "" to the state; if this is the case, we should be okay; and if not, a condition might need to be added accordingly. I don't think this should be the case though.
Please test these changes (for all cases we ideated previously) and let me know if you discover something unusual