-
Notifications
You must be signed in to change notification settings - Fork 178
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
chore: Supports legacy API in create when using old schema with num_shards #2892
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.
nice!
@@ -190,7 +191,12 @@ func (r *rs) createCluster(ctx context.Context, plan *TFModel, diags *diag.Diagn | |||
if pauseAfter { | |||
latestReq.Paused = nil | |||
} | |||
_, _, err = api.CreateCluster(ctx, projectID, latestReq).Execute() | |||
if usingLegacySchema(ctx, plan.ReplicationSpecs, diags) { |
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.
can we add an acc test that would fail before this change?
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.
See comment here: https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2892/files#r1885034045
I don't know if we have any test that would have a failure by using this old API as I'm not 100% sure that it triggers ISS or auto_scaling_mode=SHARD 🤔
@@ -90,7 +90,7 @@ steps: | |||
text: "true" | |||
- path: /api/atlas/v2/groups/{groupId}/clusters | |||
method: POST | |||
version: '2024-10-23' | |||
version: '2024-08-05' |
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.
@lantoli you can see the required update here
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.
@EspenAlbert oh, nice!
* master: chore: Supports legacy API in create when using old schema with num_shards (#2892)
Description
Supports legacy API in create when using old schema with num_shards
Link to any related issue(s): CLOUDP-287995
Type of change:
Required Checklist:
Further comments