-
Notifications
You must be signed in to change notification settings - Fork 190
fix: Removes interval_min
plan modifier to avoid error on update
#3051
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
Conversation
APIx bot: a message has been sent to Docs Slack channel |
@@ -464,6 +463,46 @@ func TestAccConfigRSAlertConfiguration_withPagerDuty(t *testing.T) { | |||
}) | |||
} | |||
|
|||
func TestAccConfigRSAlertConfiguration_withEmailToPagerDuty(t *testing.T) { |
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.
Nice test case!
internal/service/alertconfiguration/resource_alert_configuration_test.go
Outdated
Show resolved
Hide resolved
@@ -283,9 +283,6 @@ func (r *alertConfigurationRS) Schema(ctx context.Context, req resource.SchemaRe | |||
"interval_min": schema.Int64Attribute{ | |||
Optional: true, | |||
Computed: true, | |||
PlanModifiers: []planmodifier.Int64{ |
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.
An alternative fix would be using requireReplace on changes to type_name
that might handle more cases where UseStateForUnknown
is not safe
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.
Since there is the Update API available, I think it's better to follow standard update behavior
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.
is there any chance this UseStateForUnknown was needed for something else?
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.
From the PR where it was introduced I see that it was only to reduce plan verbosity
…on_test.go Co-authored-by: Leo Antoli <[email protected]>
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
* master: doc: Renames env var to `MONGODB_ATLAS_PREVIEW_PROVIDER_V2_ADVANCED_CLUSTER` (#3062) chore: Updates Atlas Go SDK (#3053) test: Tenant clusters with disk_size_gb is always 5 now (#3057) chore: Updates CHANGELOG.md for #3051 fix: Removes `interval_min` plan modifier to avoid error on update (#3051) build(deps): bump go.mongodb.org/atlas-sdk (#3049) doc: Adds pinned_fcv.version as exported attribute in cluster and advanced cluster resource (#3047) update Go to 1.23.6 (#3045) chore: Adds HTTP status check helper methods (#3035) chore: Adds import checks to tests (#3039) chore: Updates CHANGELOG.md header for v1.26.1 release chore: Updates examples link in index.md for v1.26.1 release fix: Adds "state_name" to keepUnknown list to prevent copying volatile attributes from state (#3040)
Description
avoids error when updating from an email notification to a 'PAGER_DUTY', 'OPS_GENIE' or 'VICTOR_OPS' that require
interval_min
attribute to not be setLink to any related issue(s): HELP-70810
Type of change:
Required Checklist:
Further comments