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

chore: Removes 1.20 deprecations #2617

Merged
merged 7 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .changelog/2617.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
```release-note:breaking-change
EspenAlbert marked this conversation as resolved.
Show resolved Hide resolved
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
```
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/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
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
Loading