-
Notifications
You must be signed in to change notification settings - Fork 381
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
Deprecate Silence attribute and Fix multiple terraform runs #221
Conversation
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.
So overall this is a real improvement, except one scenario that I pointed in one of the comments. Whenever you fix that, please consider adding some tests for this, since it's somewhat unintuitive (at least for me) how this works.
…datadog into nick/silence
Type: schema.TypeMap, | ||
Optional: true, | ||
Elem: schema.TypeInt, | ||
Deprecated: "use Downtime Resource instead", |
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.
👍
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 now, nice job! 👍
I only have one minor nit in terms of test names - if you could name them TestAccDatadogMonitor_Silenced*
, it would be easier to run all tests related to silenced
with -run TestAccDatadogMonitor_Silenced
when running go test
. I think it would be more practical, but I don't mean to block this PR getting merged on it.
Also, please squash the commits that you did to not pollute project history. Thanks!
Good idea, just changed the test function names based on your suggestion. I'll do a |
Yup, go ahead with squashing and merging 👍 |
Great stuff :) |
This PR looks to accomplish a few things surrounding the
silence
attribute of monitor resources.silenced
param soon. (In a couple Major versions of the Provider as outlined by the best practices doc - https://www.terraform.io/docs/extend/best-practices/deprecations.html)-1
on any scope of the silenced attribute to unmute that scope. This will make a separate API call to unmute those scopes (Only on updates, newly created monitors shouldn't be muted :) )