Skip to content

Commit

Permalink
chore: Removes 1.20 deprecations (#2617)
Browse files Browse the repository at this point in the history
* chore: Removes `err_msg` from cloud_backup_snapshot_export_job

* chore: add changelog entry

* doc: Add attribute removal to upgrade-guide

* chore: Removes `cluster_id` from `mongodbatlas_federated_database_instance`

* chore: add attribute removal to migration guide and changelog entry

* chore: fix changelog entry
  • Loading branch information
EspenAlbert authored Sep 20, 2024
1 parent 7c66490 commit 0544780
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 43 deletions.
23 changes: 23 additions & 0 deletions .changelog/2617.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
```release-note:breaking-change
resource/mongodbatlas_cloud_backup_snapshot_export_job: Removes `err_msg` attribute
```

```release-note:breaking-change
data-source/mongodbatlas_cloud_backup_snapshot_export_job: Removes `err_msg` attribute
```

```release-note:breaking-change
data-source/mongodbatlas_cloud_backup_snapshot_export_jobs: Removes `err_msg` attribute
```

```release-note:breaking-change
resource/mongodbatlas_federated_database_instance: Removes `storage_stores.#.cluster_id` attribute
```

```release-note:breaking-change
data-source/mongodbatlas_federated_database_instance: Removes `storage_stores.#.cluster_id` attribute
```

```release-note:breaking-change
data-source/mongodbatlas_federated_database_instances: Removes `storage_stores.#.cluster_id` attribute
```
1 change: 0 additions & 1 deletion docs/data-sources/cloud_backup_snapshot_export_job.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ In addition to all arguments above, the following attributes are exported:
* `custom_data` - Custom data to include in the metadata file named `.complete` that Atlas uploads to the bucket when the export job finishes. Custom data can be specified as key and value pairs.
* `components` - _Returned for sharded clusters only._ Export job details for each replica set in the sharded cluster.
* `created_at` - Timestamp in ISO 8601 date and time format in UTC when the export job was created.
* `err_msg` - Error message, only if the export job failed. **Note:** This attribute is deprecated as it is not being used.
* `export_status` - _Returned for replica set only._ Status of the export job.
* `finished_at` - Timestamp in ISO 8601 date and time format in UTC when the export job completes.
* `export_job_id` - Unique identifier of the export job.
Expand Down
1 change: 0 additions & 1 deletion docs/data-sources/cloud_backup_snapshot_export_jobs.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ In addition to all arguments above, the following attributes are exported:
* `custom_data` - Custom data to include in the metadata file named `.complete` that Atlas uploads to the bucket when the export job finishes. Custom data can be specified as key and value pairs.
* `components` - _Returned for sharded clusters only._ Export job details for each replica set in the sharded cluster.
* `created_at` - Timestamp in ISO 8601 date and time format in UTC when the export job was created.
* `err_msg` - Error message, only if the export job failed. **Note:** This attribute is deprecated as it is not being used.
* `export_status` - _Returned for replica set only._ Status of the export job.
* `finished_at` - Timestamp in ISO 8601 date and time format in UTC when the export job completes.
* `export_job_id` - Unique identifier of the export job.
Expand Down
1 change: 0 additions & 1 deletion docs/data-sources/federated_database_instance.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ In addition to all arguments above, the following attributes are exported:
* `storage_stores.#.delimiter` - The delimiter that separates `storage_databases.#.collections.#.data_sources.#.path` segments in the data store.
* `storage_stores.#.include_tags` - Determines whether or not to use S3 tags on the files in the given path as additional partition attributes.
* `storage_stores.#.cluster_name` - Human-readable label of the MongoDB Cloud cluster on which the store is based.
* `storage_stores.#.cluster_id` - ID of the Cluster the Online Archive belongs to.
* `storage_stores.#.allow_insecure` - Flag that validates the scheme in the specified URLs.
* `storage_stores.#.public` - Flag that indicates whether the bucket is public.
* `storage_stores.#.default_format` - Default format that Data Lake assumes if it encounters a file without an extension while searching the storeName.
Expand Down
1 change: 0 additions & 1 deletion docs/data-sources/federated_database_instances.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ In addition to all arguments above, the following attributes are exported:
* `storage_stores.#.delimiter` - The delimiter that separates `storage_databases.#.collections.#.data_sources.#.path` segments in the data store.
* `storage_stores.#.include_tags` - Determines whether or not to use S3 tags on the files in the given path as additional partition attributes.
* `storage_stores.#.cluster_name` - Human-readable label of the MongoDB Cloud cluster on which the store is based.
* `storage_stores.#.cluster_id` - ID of the Cluster the Online Archive belongs to.
* `storage_stores.#.allow_insecure` - Flag that validates the scheme in the specified URLs.
* `storage_stores.#.public` - Flag that indicates whether the bucket is public.
* `storage_stores.#.default_format` - Default format that Data Lake assumes if it encounters a file without an extension while searching the storeName.
Expand Down
4 changes: 4 additions & 0 deletions docs/guides/1.20.0-upgrade-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ The Terraform MongoDB Atlas Provider version 1.20.0 has a number of new and exci
- data-source/mongodbatlas_data_lake_pipeline_run
- data-source/mongodbatlas_data_lake_pipeline_runs

- Attribute `err_msg` removed from `mongodbatlas_cloud_backup_snapshot_export_job` resource and data sources.
- Attribute `storage_stores.#.cluster_id` removed from `mongodbatlas_federated_database_instance` resource and data sources.

**Breaking Changes:**

- `mongodbatlas_alert_configuration` resource attribute `notification.#.integration_id` may have a computed value due to recent updates in the Atlas API [Alert Configuration](https://www.mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Alert-Configurations/operation/getAlertConfiguration). Due to this, MongoDB Atlas Provider versions **1.16.0 to 1.19.0** may experience non-empty plans if you are using this resource with an integration set for the notifications without an explicitly set `integration_id`. For more details, see [#2603](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2603).

These users should either:
Expand Down
1 change: 0 additions & 1 deletion docs/resources/cloud_backup_snapshot_export_job.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ In addition to all arguments above, the following attributes are exported:

* `components` - _Returned for sharded clusters only._ Export job details for each replica set in the sharded cluster.
* `created_at` - Timestamp in ISO 8601 date and time format in UTC when the export job was created.
* `err_msg` - Error message, only if the export job failed. **Note:** This attribute is deprecated as it is not being used.
* `export_status` - _Returned for replica set only._ Status of the export job.
* `finished_at` - Timestamp in ISO 8601 date and time format in UTC when the export job completes.
* `export_job_id` - Unique identifier of the export job.
Expand Down
1 change: 0 additions & 1 deletion docs/resources/federated_database_instance.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ resource "mongodbatlas_federated_database_instance" "test" {
* `storage_stores.#.delimiter` - The delimiter that separates `storage_databases.#.collections.#.data_sources.#.path` segments in the data store.
* `storage_stores.#.include_tags` - Determines whether or not to use S3 tags on the files in the given path as additional partition attributes.
* `storage_stores.#.cluster_name` - Human-readable label of the MongoDB Cloud cluster on which the store is based.
* `storage_stores.#.cluster_id` - ID of the Cluster the Online Archive belongs to.
* `storage_stores.#.allow_insecure` - Flag that validates the scheme in the specified URLs.
* `storage_stores.#.public` - Flag that indicates whether the bucket is public.
* `storage_stores.#.default_format` - Default format that Data Lake assumes if it encounters a file without an extension while searching the storeName.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ package cloudbackupsnapshotexportjob

import (
"context"
"fmt"

"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/common/constant"
)

func DataSource() *schema.Resource {
Expand Down Expand Up @@ -68,11 +66,6 @@ func DataSource() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"err_msg": {
Type: schema.TypeString,
Computed: true,
Deprecated: fmt.Sprintf(constant.DeprecationParamByVersion, "1.20.0"),
},
"export_bucket_id": {
Type: schema.TypeString,
Computed: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@ package cloudbackupsnapshotexportjob

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/common/conversion"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/config"
"go.mongodb.org/atlas-sdk/v20240805004/admin"
Expand Down Expand Up @@ -81,11 +79,6 @@ func PluralDataSource() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"err_msg": {
Type: schema.TypeString,
Computed: true,
Deprecated: fmt.Sprintf(constant.DeprecationParamByVersion, "1.20.0"),
},
"export_bucket_id": {
Type: schema.TypeString,
Computed: true,
Expand Down Expand Up @@ -163,7 +156,6 @@ func flattenCloudBackupSnapshotExportJobs(jobs []admin.DiskBackupExportJob) []ma
"components": flattenExportJobsComponents(job.GetComponents()),
"custom_data": flattenExportJobsCustomData(job.GetCustomData()),
"export_bucket_id": job.GetExportBucketId(),
"err_msg": "",
"export_status_exported_collections": job.ExportStatus.GetExportedCollections(),
"export_status_total_collections": job.ExportStatus.GetTotalCollections(),
"finished_at": conversion.TimePtrToStringPtr(job.FinishedAt),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (

"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"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/common/conversion"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/config"
"go.mongodb.org/atlas-sdk/v20240805004/admin"
Expand Down Expand Up @@ -94,11 +93,6 @@ func returnCloudBackupSnapshotExportJobSchema() map[string]*schema.Schema {
Type: schema.TypeString,
Computed: true,
},
"err_msg": {
Type: schema.TypeString,
Computed: true,
Deprecated: fmt.Sprintf(constant.DeprecationParamByVersion, "1.20.0"),
},
"export_status_exported_collections": {
Type: schema.TypeInt,
Computed: true,
Expand Down Expand Up @@ -185,10 +179,6 @@ func setExportJobFields(d *schema.ResourceData, exportJob *admin.DiskBackupExpor
return diag.Errorf("error setting `created_at` for snapshot export job (%s): %s", d.Id(), err)
}

if err := d.Set("err_msg", ""); err != nil {
return diag.Errorf("error setting `created_at` for snapshot export job (%s): %s", d.Id(), err)
}

if err := d.Set("export_bucket_id", exportJob.GetExportBucketId()); err != nil {
return diag.Errorf("error setting `created_at` for snapshot export job (%s): %s", d.Id(), err)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (

"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"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/common/conversion"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/config"
)
Expand Down Expand Up @@ -229,10 +228,6 @@ func schemaFederatedDatabaseInstanceStoresDataSource() *schema.Schema {
Type: schema.TypeString,
Computed: true,
},
"cluster_id": {
Type: schema.TypeString,
Computed: true,
Deprecated: fmt.Sprintf(constant.DeprecationParamByDate, "September 2024")},
"project_id": {
Type: schema.TypeString,
Computed: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (

"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"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/common/conversion"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/config"
)
Expand Down Expand Up @@ -271,12 +270,6 @@ func schemaFederatedDatabaseInstanceStores() *schema.Schema {
Computed: true,
Optional: true,
},
"cluster_id": {
Type: schema.TypeString,
Computed: true,
Optional: true,
Deprecated: fmt.Sprintf(constant.DeprecationParamByDate, "September 2024"),
},
"project_id": {
Type: schema.TypeString,
Computed: true,
Expand Down

0 comments on commit 0544780

Please sign in to comment.