Skip to content

Commit

Permalink
remove!: Removes page_num and items_per_page attributes in mongodbatl…
Browse files Browse the repository at this point in the history
…as_search_indexes data source (#1880)
  • Loading branch information
AgustinBettati authored Jan 29, 2024
1 parent 3daca65 commit b2a50fb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 22 deletions.
12 changes: 0 additions & 12 deletions internal/service/searchindex/data_source_search_indexes.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@ package searchindex

import (
"context"
"fmt"

"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/id"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/common/constant"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/config"
"go.mongodb.org/atlas-sdk/v20231115005/admin"
)
Expand All @@ -32,16 +30,6 @@ func PluralDataSource() *schema.Resource {
Type: schema.TypeString,
Required: true,
},
"page_num": {
Type: schema.TypeInt,
Optional: true,
Deprecated: fmt.Sprintf(constant.DeprecationParamByVersion, "1.15.0"),
},
"items_per_page": {
Type: schema.TypeInt,
Optional: true,
Deprecated: fmt.Sprintf(constant.DeprecationParamByVersion, "1.15.0"),
},
"results": {
Type: schema.TypeList,
Computed: true,
Expand Down
8 changes: 1 addition & 7 deletions website/docs/d/search_indexes.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,11 @@ Describes a Search Indexes.
## Example Usage

```terraform
data "mongodbatlas_search_index" "test" {
data "mongodbatlas_search_indexes" "test" {
project_id = "<PROJECT_ID>"
cluster_name = "<CLUSTER_NAME>"
database_name ="<DATABASE_NAME>"
collection_name = "<COLLECTION_NAME>"
page_num = 1
items_per_page = 100
}
```

Expand All @@ -34,8 +30,6 @@ data "mongodbatlas_search_index" "test" {
* `cluster_name` - (Required) Name of the cluster containing the collection with one or more Atlas Search indexes.
* `database_name` - (Required) Name of the database containing the collection with one or more Atlas Search indexes.
* `collection_name` - (Required) Name of the collection with one or more Atlas Search indexes.
* `page_num` - Page number, starting with one, that Atlas returns of the total number of objects. **WARNING:** this parameter is deprecated and will be removed in version 1.15.0
* `items_per_page` - Number of items that Atlas returns per page, up to a maximum of 500. **WARNING:** this parameter is deprecated and will be removed in version 1.15.0

## Attributes Reference
* `total_count` - Represents the total of the search indexes
Expand Down
9 changes: 6 additions & 3 deletions website/docs/guides/1.15.0-upgrade-guide.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@ The Terraform MongoDB Atlas Provider version 1.15.0 has a number of new and exci

**Breaking Changes:**

**Deprecations and Removals:**
**Deprecations and Removals:**

Format of IdP Id that uniquely identifies the identity provider when importing [`mongodbatlas_federated_settings_identity_provider`](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/resources/federated_settings_identity_provider) resource and [`mongodbatlas_federated_settings_identity_provider`](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/data-sources/federated_settings_identity_provider) data source now accepts a different format to align with the Atlas Admin API. Both the current and new IdP Id format are accepted in terraform-provider 1.15.0 version. New features for `mongodbatlas_federated_settings_identity_provider` resource and data source will only be available when using the new Id format.
- Removal of `page_num` and `items_per_page` attributes in `mongodbatlas_search_indexes` data source.
- Format of IdP Id that uniquely identifies the identity provider when importing [`mongodbatlas_federated_settings_identity_provider`](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/resources/federated_settings_identity_provider) resource and [`mongodbatlas_federated_settings_identity_provider`](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/data-sources/federated_settings_identity_provider) data source now accepts a different format to align with the Atlas Admin API. Details and upgrade guide can be found below:

Both the current and new IdP Id format are accepted in terraform-provider 1.15.0 version. New features for `mongodbatlas_federated_settings_identity_provider` resource and data source will only be available when using the new Id format.

***WARNING:*** Old IdP Id format will no longer be accepted starting in terraform-provider 1.16.0 version and onwards. We recommend to update to the new format as soon as possible. A warning will appear if old Id is still being used. Follow the guide below to start using the new Id format.

Expand Down Expand Up @@ -60,4 +63,4 @@ Update Guide:

* [Request Features](https://feedback.mongodb.com/forums/924145-atlas?category_id=370723)

* [Contact Support](https://docs.atlas.mongodb.com/support/) covered by MongoDB Atlas support plans, Developer and above.
* [Contact Support](https://docs.atlas.mongodb.com/support/) covered by MongoDB Atlas support plans, Developer and above.

0 comments on commit b2a50fb

Please sign in to comment.