Skip to content

Commit

Permalink
deprecate: Deprecates Serverless functionality (#2742)
Browse files Browse the repository at this point in the history
* deprecates serverless functionality

* documentation

* deprecate attributes in data sources

* set link to migration guide with supported migration paths
  • Loading branch information
oarbusi authored Nov 11, 2024
1 parent 01cd8f2 commit 4529b81
Show file tree
Hide file tree
Showing 15 changed files with 109 additions and 27 deletions.
39 changes: 39 additions & 0 deletions .changelog/2742.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
```release-note:note
resource/mongodbatlas_serverless_instance: Deprecates `continuous_backup_enabled` attribute
```

```release-note:note
resource/mongodbatlas_serverless_instance: Deprecates `auto_indexing` attribute
```

```release-note:note
data-source/mongodbatlas_serverless_instance: Deprecates `continuous_backup_enabled` attribute
```

```release-note:note
data-source/mongodbatlas_serverless_instance: Deprecates `auto_indexing` attribute
```

```release-note:note
data-source/mongodbatlas_serverless_instances: Deprecates `continuous_backup_enabled` attribute
```

```release-note:note
data-source/mongodbatlas_serverless_instances: Deprecates `auto_indexing` attribute
```

```release-note:note
resource/mongodbatlas_privatelink_endpoint_serverless: Deprecates resource
```

```release-note:note
resource/mongodbatlas_privatelink_endpoint_service_serverless: Deprecates resource
```

```release-note:note
data-source/mongodbatlas_privatelink_endpoint_service_serverless: Deprecates data source
```

```release-note:note
data-source/mongodbatlas_privatelink_endpoints_service_serverless: Deprecates data source
```
6 changes: 6 additions & 0 deletions docs/data-sources/privatelink_endpoint_service_serverless.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
subcategory: "Deprecated"
---

**WARNING:** This data source is deprecated and will be removed in March 2025. For more datails see [Migration Guide: Transition out of Serverless Instances and Shared-tier clusters](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide)

# Data Source: privatelink_endpoint_service_serverless

`privatelink_endpoint_service_serverless` provides a Serverless PrivateLink Endpoint Service resource.
Expand Down
6 changes: 6 additions & 0 deletions docs/data-sources/privatelink_endpoints_service_serverless.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
subcategory: "Deprecated"
---

**WARNING:** This data source is deprecated and will be removed in March 2025. For more datails see [Migration Guide: Transition out of Serverless Instances and Shared-tier clusters](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide)

# Data Source: privatelink_endpoints_service_serverless

`privatelink_endpoints_service_serverless` describes the list of all Serverless PrivateLink Endpoint Service resource.
Expand Down
4 changes: 2 additions & 2 deletions docs/data-sources/serverless_instance.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ Follow this example to [setup private connection to a serverless instance using
* `provider_settings_provider_name` - Cloud service provider that applies to the provisioned the serverless instance.
* `provider_settings_region_name` - Human-readable label that identifies the physical location of your MongoDB serverless instance. The region you choose can affect network latency for clients accessing your databases.
* `state_name` - Stage of deployment of this serverless instance when the resource made its request.
* `continuous_backup_enabled` - Flag that indicates whether the serverless instance uses Serverless Continuous Backup.
* `continuous_backup_enabled` - (Deprecated) Flag that indicates whether the serverless instance uses Serverless Continuous Backup.
* `termination_protection_enabled` - Flag that indicates whether termination protection is enabled on the cluster. If set to true, MongoDB Cloud won't delete the cluster. If set to false, MongoDB Cloud will delete the cluster.
* `auto_indexing` - Flag that indicates whether the serverless instance uses [Serverless Auto Indexing](https://www.mongodb.com/docs/atlas/performance-advisor/auto-index-serverless/).
* `auto_indexing` - (Deprecated) Flag that indicates whether the serverless instance uses [Serverless Auto Indexing](https://www.mongodb.com/docs/atlas/performance-advisor/auto-index-serverless/).
* `tags` - Set that contains key-value pairs between 1 to 255 characters in length for tagging and categorizing the cluster. See [below](#tags).

### Tags
Expand Down
4 changes: 2 additions & 2 deletions docs/data-sources/serverless_instances.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ data "mongodbatlas_serverless_instances" "data_serverless" {
* `provider_settings_provider_name` - Cloud service provider that applies to the provisioned the serverless instance.
* `provider_settings_region_name` - Human-readable label that identifies the physical location of your MongoDB serverless instance. The region you choose can affect network latency for clients accessing your databases.
* `state_name` - Stage of deployment of this serverless instance when the resource made its request.
* `continuous_backup_enabled` - Flag that indicates whether the serverless instance uses Serverless Continuous Backup.
* `continuous_backup_enabled` - (Deprecated) Flag that indicates whether the serverless instance uses Serverless Continuous Backup.
* `termination_protection_enabled` - Flag that indicates whether termination protection is enabled on the cluster. If set to true, MongoDB Cloud won't delete the cluster. If set to false, MongoDB Cloud will delete the cluster.
* `auto_indexing` - Flag that indicates whether the serverless instance uses [Serverless Auto Indexing](https://www.mongodb.com/docs/atlas/performance-advisor/auto-index-serverless/).
* `auto_indexing` - (Deprecated) Flag that indicates whether the serverless instance uses [Serverless Auto Indexing](https://www.mongodb.com/docs/atlas/performance-advisor/auto-index-serverless/).
* `tags` - Set that contains key-value pairs between 1 to 255 characters in length for tagging and categorizing the cluster. See [below](#tags).

### Tags
Expand Down
6 changes: 6 additions & 0 deletions docs/resources/privatelink_endpoint_serverless.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
subcategory: "Deprecated"
---

**WARNING:** This resource is deprecated and will be removed in March 2025. For more datails see [Migration Guide: Transition out of Serverless Instances and Shared-tier clusters](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide)

# Resource: privatelink_endpoint_serverless

`privatelink_endpoint_serverless` Provides a Serverless PrivateLink Endpoint resource.
Expand Down
6 changes: 6 additions & 0 deletions docs/resources/privatelink_endpoint_service_serverless.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
subcategory: "Deprecated"
---

**WARNING:** This resource is deprecated and will be removed in March 2025. For more datails see [Migration Guide: Transition out of Serverless Instances and Shared-tier clusters](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide)

# Resource: privatelink_endpoint_service_serverless

`privatelink_endpoint_service_serverless` Provides a Serverless PrivateLink Endpoint Service resource.
Expand Down
4 changes: 2 additions & 2 deletions docs/resources/serverless_instance.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ Follow this example to [setup private connection to a serverless instance using
* `provider_settings_provider_name` - (Required) Cloud service provider that applies to the provisioned the serverless instance.
* `provider_settings_region_name` - (Required)
Human-readable label that identifies the physical location of your MongoDB serverless instance. The region you choose can affect network latency for clients accessing your databases.
* `continuous_backup_enabled` - (Optional) Flag that indicates whether the serverless instance uses [Serverless Continuous Backup](https://www.mongodb.com/docs/atlas/configure-serverless-backup). If this parameter is false or not used, the serverless instance uses [Basic Backup](https://www.mongodb.com/docs/atlas/configure-serverless-backup).
* `continuous_backup_enabled` - (Deprecated, Optional) Flag that indicates whether the serverless instance uses [Serverless Continuous Backup](https://www.mongodb.com/docs/atlas/configure-serverless-backup). If this parameter is false or not used, the serverless instance uses [Basic Backup](https://www.mongodb.com/docs/atlas/configure-serverless-backup).
* `termination_protection_enabled` - Flag that indicates whether termination protection is enabled on the cluster. If set to true, MongoDB Cloud won't delete the cluster. If set to false, MongoDB Cloud will delete the cluster.
* `auto_indexing` - (Optional) Flag that indicates whether the serverless instance uses [Serverless Auto Indexing](https://www.mongodb.com/docs/atlas/performance-advisor/auto-index-serverless/). This parameter defaults to true.
* `auto_indexing` - (Deprecated, Optional) Flag that indicates whether the serverless instance uses [Serverless Auto Indexing](https://www.mongodb.com/docs/atlas/performance-advisor/auto-index-serverless/). This parameter defaults to true.
* `tags` - (Optional) Set that contains key-value pairs between 1 to 255 characters in length for tagging and categorizing the cluster. See [below](#tags).

### Tags
Expand Down
17 changes: 10 additions & 7 deletions internal/common/constant/deprecation.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
package constant

const (
DeprecationParam = "This parameter is deprecated."
DeprecationParamWithReplacement = "This parameter is deprecated. Please transition to %s."
DeprecationParamByVersion = "This parameter is deprecated and will be removed in version %s."
DeprecationParamByVersionWithReplacement = "This parameter is deprecated and will be removed in version %s. Please transition to %s."
DeprecationParamFutureWithReplacement = "This parameter is deprecated and will be removed in the future. Please transition to %s"
DeprecationResourceByDateWithReplacement = "This resource is deprecated and will be removed in %s. Please transition to %s."
DeprecationDataSourceByDateWithReplacement = "This data source is deprecated and will be removed in %s. Please transition to %s."
DeprecationParam = "This parameter is deprecated."
DeprecationParamWithReplacement = "This parameter is deprecated. Please transition to %s."
DeprecationParamByVersion = "This parameter is deprecated and will be removed in version %s."
DeprecationParamByVersionWithReplacement = "This parameter is deprecated and will be removed in version %s. Please transition to %s."
DeprecationParamFutureWithReplacement = "This parameter is deprecated and will be removed in the future. Please transition to %s"
DeprecationResourceByDateWithReplacement = "This resource is deprecated and will be removed in %s. Please transition to %s."
DeprecationDataSourceByDateWithReplacement = "This data source is deprecated and will be removed in %s. Please transition to %s."
DeprecationResourceByDateWithExternalLink = "This resource is deprecated and will be removed in %s. For more details see %s."
DeprecationDataSourceByDateWithExternalLink = "This data source is deprecated and will be removed in %s. For more details see %s."
DeprecatioParamByDateWithExternalLink = "This parameter is deprecated and will be removed in %s. For more details see %s."
)
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"

"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"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/service/privatelinkendpoint"
Expand All @@ -34,6 +35,7 @@ func Resource() *schema.Resource {
Importer: &schema.ResourceImporter{
StateContext: resourceImport,
},
DeprecationMessage: fmt.Sprintf(constant.DeprecationResourceByDateWithExternalLink, "March 2025", "https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide"),
Schema: map[string]*schema.Schema{
"project_id": {
Type: schema.TypeString,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@ 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"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/service/privatelinkendpointservice"
)

func DataSource() *schema.Resource {
return &schema.Resource{
ReadContext: dataSourceRead,
ReadContext: dataSourceRead,
DeprecationMessage: fmt.Sprintf(constant.DeprecationDataSourceByDateWithExternalLink, "March 2025", "https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide"),
Schema: map[string]*schema.Schema{
"project_id": {
Type: schema.TypeString,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@ package privatelinkendpointserviceserverless

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/v20241023001/admin"
)

func PluralDataSource() *schema.Resource {
return &schema.Resource{
ReadContext: dataSourcePluralRead,
ReadContext: dataSourcePluralRead,
DeprecationMessage: fmt.Sprintf(constant.DeprecationDataSourceByDateWithExternalLink, "March 2025", "https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide"),
Schema: map[string]*schema.Schema{
"project_id": {
Type: schema.TypeString,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"

"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 All @@ -34,6 +35,7 @@ func Resource() *schema.Resource {
Importer: &schema.ResourceImporter{
StateContext: resourceImport,
},
DeprecationMessage: fmt.Sprintf(constant.DeprecationResourceByDateWithExternalLink, "March 2025", "https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide"),
Schema: map[string]*schema.Schema{
"project_id": {
Type: schema.TypeString,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ package serverlessinstance

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"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/common/conversion"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/config"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/service/advancedcluster"
Expand Down Expand Up @@ -88,14 +90,16 @@ func dataSourceSchema() map[string]*schema.Schema {
Computed: true,
},
"continuous_backup_enabled": {
Type: schema.TypeBool,
Optional: true,
Computed: true,
Deprecated: fmt.Sprintf(constant.DeprecatioParamByDateWithExternalLink, "March 2025", "https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide"),
Type: schema.TypeBool,
Optional: true,
Computed: true,
},
"auto_indexing": {
Type: schema.TypeBool,
Optional: true,
Computed: true,
Deprecated: fmt.Sprintf(constant.DeprecatioParamByDateWithExternalLink, "March 2025", "https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide"),
Type: schema.TypeBool,
Optional: true,
Computed: true,
},
"tags": &advancedcluster.DSTagsSchema,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry"
"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"
"github.com/mongodb/terraform-provider-mongodbatlas/internal/service/advancedcluster"
Expand Down Expand Up @@ -110,14 +111,16 @@ func resourceSchema() map[string]*schema.Schema {
Computed: true,
},
"continuous_backup_enabled": {
Type: schema.TypeBool,
Optional: true,
Computed: true,
Deprecated: fmt.Sprintf(constant.DeprecatioParamByDateWithExternalLink, "March 2025", "https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide"),
Type: schema.TypeBool,
Optional: true,
Computed: true,
},
"auto_indexing": {
Type: schema.TypeBool,
Optional: true,
Computed: true,
Deprecated: fmt.Sprintf(constant.DeprecatioParamByDateWithExternalLink, "March 2025", "https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide"),
Type: schema.TypeBool,
Optional: true,
Computed: true,
},
"tags": &advancedcluster.RSTagsSchema,
}
Expand Down

0 comments on commit 4529b81

Please sign in to comment.