diff --git a/.changelog/2742.txt b/.changelog/2742.txt new file mode 100644 index 0000000000..eb7fed6d0c --- /dev/null +++ b/.changelog/2742.txt @@ -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 +``` diff --git a/docs/data-sources/privatelink_endpoint_service_serverless.md b/docs/data-sources/privatelink_endpoint_service_serverless.md index 224a17c1e0..bc054fa0fc 100644 --- a/docs/data-sources/privatelink_endpoint_service_serverless.md +++ b/docs/data-sources/privatelink_endpoint_service_serverless.md @@ -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. diff --git a/docs/data-sources/privatelink_endpoints_service_serverless.md b/docs/data-sources/privatelink_endpoints_service_serverless.md index 6740e49d52..997b84a29f 100644 --- a/docs/data-sources/privatelink_endpoints_service_serverless.md +++ b/docs/data-sources/privatelink_endpoints_service_serverless.md @@ -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. diff --git a/docs/data-sources/serverless_instance.md b/docs/data-sources/serverless_instance.md index 48a0be84d7..6776c53b2f 100644 --- a/docs/data-sources/serverless_instance.md +++ b/docs/data-sources/serverless_instance.md @@ -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 diff --git a/docs/data-sources/serverless_instances.md b/docs/data-sources/serverless_instances.md index 5dfb38816f..1c7a976d53 100644 --- a/docs/data-sources/serverless_instances.md +++ b/docs/data-sources/serverless_instances.md @@ -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 diff --git a/docs/resources/privatelink_endpoint_serverless.md b/docs/resources/privatelink_endpoint_serverless.md index d5edd9dc3e..bcd41d0238 100644 --- a/docs/resources/privatelink_endpoint_serverless.md +++ b/docs/resources/privatelink_endpoint_serverless.md @@ -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. diff --git a/docs/resources/privatelink_endpoint_service_serverless.md b/docs/resources/privatelink_endpoint_service_serverless.md index c541969aa0..8cf2ec9211 100644 --- a/docs/resources/privatelink_endpoint_service_serverless.md +++ b/docs/resources/privatelink_endpoint_service_serverless.md @@ -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. diff --git a/docs/resources/serverless_instance.md b/docs/resources/serverless_instance.md index 03b283632f..df3daf7c34 100644 --- a/docs/resources/serverless_instance.md +++ b/docs/resources/serverless_instance.md @@ -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 diff --git a/internal/common/constant/deprecation.go b/internal/common/constant/deprecation.go index b0fc609f2e..458eaaab70 100644 --- a/internal/common/constant/deprecation.go +++ b/internal/common/constant/deprecation.go @@ -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." ) diff --git a/internal/service/privatelinkendpointserverless/resource_privatelink_endpoint_serverless.go b/internal/service/privatelinkendpointserverless/resource_privatelink_endpoint_serverless.go index 50552018bb..803e7ee153 100644 --- a/internal/service/privatelinkendpointserverless/resource_privatelink_endpoint_serverless.go +++ b/internal/service/privatelinkendpointserverless/resource_privatelink_endpoint_serverless.go @@ -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" @@ -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, diff --git a/internal/service/privatelinkendpointserviceserverless/data_source_privatelink_endpoint_service_serverless.go b/internal/service/privatelinkendpointserviceserverless/data_source_privatelink_endpoint_service_serverless.go index 8a7331f7b3..e69fbe840b 100644 --- a/internal/service/privatelinkendpointserviceserverless/data_source_privatelink_endpoint_service_serverless.go +++ b/internal/service/privatelinkendpointserviceserverless/data_source_privatelink_endpoint_service_serverless.go @@ -6,6 +6,7 @@ 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" @@ -13,7 +14,8 @@ import ( 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, diff --git a/internal/service/privatelinkendpointserviceserverless/data_source_privatelink_endpoints_service_serverless.go b/internal/service/privatelinkendpointserviceserverless/data_source_privatelink_endpoints_service_serverless.go index 62d6e1c2c1..9cd4aa433e 100644 --- a/internal/service/privatelinkendpointserviceserverless/data_source_privatelink_endpoints_service_serverless.go +++ b/internal/service/privatelinkendpointserviceserverless/data_source_privatelink_endpoints_service_serverless.go @@ -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, diff --git a/internal/service/privatelinkendpointserviceserverless/resource_privatelink_endpoint_service_serverless.go b/internal/service/privatelinkendpointserviceserverless/resource_privatelink_endpoint_service_serverless.go index 07727479c9..67e52331a4 100644 --- a/internal/service/privatelinkendpointserviceserverless/resource_privatelink_endpoint_service_serverless.go +++ b/internal/service/privatelinkendpointserviceserverless/resource_privatelink_endpoint_service_serverless.go @@ -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" ) @@ -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, diff --git a/internal/service/serverlessinstance/data_source_serverless_instance.go b/internal/service/serverlessinstance/data_source_serverless_instance.go index 9588e65b65..ca799d60cf 100644 --- a/internal/service/serverlessinstance/data_source_serverless_instance.go +++ b/internal/service/serverlessinstance/data_source_serverless_instance.go @@ -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" @@ -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, } diff --git a/internal/service/serverlessinstance/resource_serverless_instance.go b/internal/service/serverlessinstance/resource_serverless_instance.go index 53badc028e..64bad2b635 100644 --- a/internal/service/serverlessinstance/resource_serverless_instance.go +++ b/internal/service/serverlessinstance/resource_serverless_instance.go @@ -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" @@ -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, }