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

[datadog_monitor] Handle zero-based priority values #2455

Merged
merged 9 commits into from
Jul 10, 2024

Conversation

carlmartensen
Copy link
Contributor

@carlmartensen carlmartensen commented Jun 24, 2024

Add support for the upcoming zero-based monitor priority values. Terraform was storing priority = null as 0 in the state which means that a monitor priority changed from null to 0 would not detect a state change. To work around this, the schema type is switched from int to string so the change is detected. Users can still enter integer values for priority despite the schema change.

This solution has the drawback of terraform apply on priority=null pre-existing monitors stating a change was applied as the terraform state is updated from 0 to "". terraform plan correctly states no change in this case.

The implemented solution was discussed with the Api Clients team and determined to be the best path forward.

rtrieu
rtrieu previously approved these changes Jun 24, 2024
Copy link
Contributor

@rtrieu rtrieu left a comment

Choose a reason for hiding this comment

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

LGTM

yaodingyd
yaodingyd previously approved these changes Jun 24, 2024
@carlmartensen carlmartensen dismissed stale reviews from yaodingyd and rtrieu via f361efb June 24, 2024 20:54
@carlmartensen carlmartensen force-pushed the carl/datadog-monitor-zero-priority-value branch from afbc7bc to 1614e5f Compare July 1, 2024 19:49
@nkzou nkzou merged commit 746f450 into master Jul 10, 2024
10 checks passed
@nkzou nkzou deleted the carl/datadog-monitor-zero-priority-value branch July 10, 2024 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants