diff --git a/.changelog/2825.txt b/.changelog/2825.txt new file mode 100644 index 0000000000..42e2f3cdcd --- /dev/null +++ b/.changelog/2825.txt @@ -0,0 +1,11 @@ +```release-note:note +resource/mongodbatlas_advanced_cluster: Adds new `advanced_configuration.0.default_max_time_ms` attribute +``` + +```release-note:note +data-source/mongodbatlas_advanced_cluster: Adds new `advanced_configuration.0.default_max_time_ms` attribute +``` + +```release-note:note +data-source/mongodbatlas_advanced_clusters: Adds new `advanced_configuration.0.default_max_time_ms` attribute +``` diff --git a/docs/data-sources/advanced_cluster.md b/docs/data-sources/advanced_cluster.md index be655ab1cd..e72e1993e4 100644 --- a/docs/data-sources/advanced_cluster.md +++ b/docs/data-sources/advanced_cluster.md @@ -202,6 +202,7 @@ Key-value pairs that categorize the cluster. Each key and value has a maximum le * `sample_size_bi_connector` - Number of documents per database to sample when gathering schema information. Defaults to 100. Available only for Atlas deployments in which BI Connector for Atlas is enabled. * `sample_refresh_interval_bi_connector` - Interval in seconds at which the mongosqld process re-samples data to create its relational schema. The default value is 300. The specified value must be a positive integer. Available only for Atlas deployments in which BI Connector for Atlas is enabled. * `transaction_lifetime_limit_seconds` - Lifetime, in seconds, of multi-document transactions. Defaults to 60 seconds. +* `default_max_time_ms` - Default time limit in milliseconds for individual read operations to complete. This option corresponds to the [defaultMaxTimeMS(https://www.mongodb.com/docs/upcoming/reference/cluster-parameters/defaultMaxTimeMS/) cluster parameter. This parameter is supported only for MongoDB version 8.0 and above. * `change_stream_options_pre_and_post_images_expire_after_seconds` - (Optional) The minimum pre- and post-image retention time in seconds This parameter is only supported for MongoDB version 6.0 and above. Defaults to `-1`(off). ## Attributes Reference diff --git a/docs/data-sources/advanced_clusters.md b/docs/data-sources/advanced_clusters.md index 4a86b4df40..8b9d5773a5 100644 --- a/docs/data-sources/advanced_clusters.md +++ b/docs/data-sources/advanced_clusters.md @@ -204,6 +204,7 @@ Key-value pairs that categorize the cluster. Each key and value has a maximum le * `oplog_min_retention_hours` - Minimum retention window for cluster's oplog expressed in hours. A value of null indicates that the cluster uses the default minimum oplog window that MongoDB Cloud calculates. * `sample_size_bi_connector` - Number of documents per database to sample when gathering schema information. Defaults to 100. Available only for Atlas deployments in which BI Connector for Atlas is enabled. * `sample_refresh_interval_bi_connector` - Interval in seconds at which the mongosqld process re-samples data to create its relational schema. The default value is 300. The specified value must be a positive integer. Available only for Atlas deployments in which BI Connector for Atlas is enabled. +* `default_max_time_ms` - Default time limit in milliseconds for individual read operations to complete. This option corresponds to the [defaultMaxTimeMS(https://www.mongodb.com/docs/upcoming/reference/cluster-parameters/defaultMaxTimeMS/) cluster parameter. This parameter is supported only for MongoDB version 8.0 and above. * `transaction_lifetime_limit_seconds` - (Optional) Lifetime, in seconds, of multi-document transactions. Defaults to 60 seconds. * `change_stream_options_pre_and_post_images_expire_after_seconds` - (Optional) The minimum pre- and post-image retention time in seconds. This parameter is only supported for MongoDB version 6.0 and above. Defaults to `-1`(off). diff --git a/docs/resources/advanced_cluster.md b/docs/resources/advanced_cluster.md index cc94cd4cad..7cf42df989 100644 --- a/docs/resources/advanced_cluster.md +++ b/docs/resources/advanced_cluster.md @@ -462,6 +462,7 @@ Include **desired options** within advanced_configuration: * `sample_refresh_interval_bi_connector` - (Optional) Interval in seconds at which the mongosqld process re-samples data to create its relational schema. The default value is 300. The specified value must be a positive integer. Available only for Atlas deployments in which BI Connector for Atlas is enabled. * `transaction_lifetime_limit_seconds` - (Optional) Lifetime, in seconds, of multi-document transactions. Defaults to 60 seconds. * `change_stream_options_pre_and_post_images_expire_after_seconds` - (Optional) The minimum pre- and post-image retention time in seconds. This option corresponds to the `changeStreamOptions.preAndPostImages.expireAfterSeconds` cluster parameter. Defaults to `-1`(off). This setting controls the retention policy of change stream pre- and post-images. Pre- and post-images are the versions of a document before and after document modification, respectively. `expireAfterSeconds` controls how long MongoDB retains pre- and post-images. When set to -1 (off), MongoDB uses the default retention policy: pre- and post-images are retained until the corresponding change stream events are removed from the oplog. To set the minimum pre- and post-image retention time, specify an integer value greater than zero. Setting this too low could increase the risk of interrupting Realm sync or triggers processing. This parameter is only supported for MongoDB version 6.0 and above. +* `default_max_time_ms` - (Optional) Default time limit in milliseconds for individual read operations to complete. This option corresponds to the [defaultMaxTimeMS(https://www.mongodb.com/docs/upcoming/reference/cluster-parameters/defaultMaxTimeMS/) cluster parameter. This parameter is supported only for MongoDB version 8.0 and above. ### Tags diff --git a/internal/service/advancedcluster/model_advanced_cluster.go b/internal/service/advancedcluster/model_advanced_cluster.go index 68ad60e56c..74a9db09f4 100644 --- a/internal/service/advancedcluster/model_advanced_cluster.go +++ b/internal/service/advancedcluster/model_advanced_cluster.go @@ -25,6 +25,7 @@ import ( ) const minVersionForChangeStreamOptions = 6.0 +const minVersionForDefaultMaxTimeMS = 8.0 var ( DSTagsSchema = schema.Schema{ @@ -117,6 +118,10 @@ func SchemaAdvancedConfigDS() *schema.Schema { Type: schema.TypeInt, Computed: true, }, + "default_max_time_ms": { + Type: schema.TypeInt, + Computed: true, + }, }, }, } @@ -262,6 +267,10 @@ func SchemaAdvancedConfig() *schema.Schema { Optional: true, Default: -1, }, + "default_max_time_ms": { + Type: schema.TypeInt, + Optional: true, + }, }, }, } @@ -511,7 +520,12 @@ func flattenProcessArgs(p20240530 *admin20240530.ClusterDescriptionProcessArgs, } else { flattenedProcessArgs[0]["change_stream_options_pre_and_post_images_expire_after_seconds"] = p.GetChangeStreamOptionsPreAndPostImagesExpireAfterSeconds() } + + if v := p.DefaultMaxTimeMS; v != nil { + flattenedProcessArgs[0]["default_max_time_ms"] = p.GetDefaultMaxTimeMS() + } } + return flattenedProcessArgs } @@ -852,10 +866,19 @@ func expandProcessArgs(d *schema.ResourceData, p map[string]any, mongodbMajorVer res.ChangeStreamOptionsPreAndPostImagesExpireAfterSeconds = conversion.IntPtr(tmpInt) } + + if _, ok := d.GetOkExists("advanced_configuration.0.default_max_time_ms"); ok { + if IsDefaultMaxTimeMinRequiredMajorVersion(mongodbMajorVersion) { + res.DefaultMaxTimeMS = conversion.Pointer(cast.ToInt(p["default_max_time_ms"])) + } else { + log.Print(ErrorDefaultMaxTimeMinVersion) + } + } + return res20240530, res } -func IsChangeStreamOptionsMinRequiredMajorVersion(input *string) bool { +func isMinRequiredMajorVersion(input *string, minVersion float64) bool { if input == nil || *input == "" { return true } @@ -869,7 +892,15 @@ func IsChangeStreamOptionsMinRequiredMajorVersion(input *string) bool { return false } - return value >= minVersionForChangeStreamOptions + return value >= minVersion +} + +func IsChangeStreamOptionsMinRequiredMajorVersion(input *string) bool { + return isMinRequiredMajorVersion(input, minVersionForChangeStreamOptions) +} + +func IsDefaultMaxTimeMinRequiredMajorVersion(input *string) bool { + return isMinRequiredMajorVersion(input, minVersionForDefaultMaxTimeMS) } func expandLabelSliceFromSetSchema(d *schema.ResourceData) ([]admin20240805.ComponentLabel, diag.Diagnostics) { diff --git a/internal/service/advancedcluster/resource_advanced_cluster.go b/internal/service/advancedcluster/resource_advanced_cluster.go index e3e453aff3..4eec6704ec 100644 --- a/internal/service/advancedcluster/resource_advanced_cluster.go +++ b/internal/service/advancedcluster/resource_advanced_cluster.go @@ -40,6 +40,7 @@ const ( ErrorClusterAdvancedSetting = "error setting `%s` for MongoDB ClusterAdvanced (%s): %s" ErrorAdvancedClusterListStatus = "error awaiting MongoDB ClusterAdvanced List IDLE: %s" ErrorOperationNotPermitted = "error operation not permitted" + ErrorDefaultMaxTimeMinVersion = "default_max_time_ms can not be set for mongo_db_major_version lower than 8.0" ignoreLabel = "Infrastructure Tool" DeprecationOldSchemaAction = "Please refer to our examples, documentation, and 1.18.0 migration guide for more details at https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/1.18.0-upgrade-guide.html.markdown" ) @@ -472,12 +473,17 @@ func resourceCreate(ctx context.Context, d *schema.ResourceData, meta any) diag. params.ConfigServerManagementMode = conversion.StringPtr(v.(string)) } - // Validate oplog_size_mb to show the error before the cluster is created. + // Validate advanced configuration params to show the error before the cluster is created. if oplogSizeMB, ok := d.GetOkExists("advanced_configuration.0.oplog_size_mb"); ok { if cast.ToInt64(oplogSizeMB) < 0 { return diag.FromErr(fmt.Errorf("`advanced_configuration.oplog_size_mb` cannot be < 0")) } } + if _, ok := d.GetOkExists("advanced_configuration.0.default_max_time_ms"); ok { + if !IsDefaultMaxTimeMinRequiredMajorVersion(params.MongoDBMajorVersion) { + return diag.FromErr(errors.New(ErrorDefaultMaxTimeMinVersion)) + } + } if err := CheckRegionConfigsPriorityOrder(params.GetReplicationSpecs()); err != nil { return diag.FromErr(err) @@ -498,7 +504,7 @@ func resourceCreate(ctx context.Context, d *schema.ResourceData, meta any) diag. if ac, ok := d.GetOk("advanced_configuration"); ok { if aclist, ok := ac.([]any); ok && len(aclist) > 0 { params20240530, params := expandProcessArgs(d, aclist[0].(map[string]any), params.MongoDBMajorVersion) - _, _, err := connV220240530.ClustersApi.UpdateClusterAdvancedConfiguration(ctx, projectID, cluster.GetName(), ¶ms20240530).Execute() + _, _, err = connV220240530.ClustersApi.UpdateClusterAdvancedConfiguration(ctx, projectID, cluster.GetName(), ¶ms20240530).Execute() if err != nil { return diag.FromErr(fmt.Errorf(errorConfigUpdate, cluster.GetName(), err)) } diff --git a/internal/service/advancedcluster/resource_advanced_cluster_migration_test.go b/internal/service/advancedcluster/resource_advanced_cluster_migration_test.go index 0f4df42670..01264f4069 100644 --- a/internal/service/advancedcluster/resource_advanced_cluster_migration_test.go +++ b/internal/service/advancedcluster/resource_advanced_cluster_migration_test.go @@ -154,7 +154,7 @@ func TestMigAdvancedCluster_geoShardedMigrationFromOldToNewSchema(t *testing.T) func TestMigAdvancedCluster_partialAdvancedConf(t *testing.T) { acc.SkipIfAdvancedClusterV2Schema(t) // This test is specific to the legacy schema - mig.SkipIfVersionBelow(t, "1.19.0") // version where change_stream_options_pre_and_post_images_expire_after_seconds was introduced + mig.SkipIfVersionBelow(t, "1.22.1") // version where default_max_time_ms was introduced var ( projectID = acc.ProjectIDExecution(t) clusterName = acc.RandomClusterName() @@ -184,7 +184,8 @@ func TestMigAdvancedCluster_partialAdvancedConf(t *testing.T) { no_table_scan = false default_read_concern = "available" sample_size_bi_connector = 110 - sample_refresh_interval_bi_connector = 310 + sample_refresh_interval_bi_connector = 310 + default_max_time_ms = 65 } bi_connector_config { @@ -224,6 +225,7 @@ func TestMigAdvancedCluster_partialAdvancedConf(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.no_table_scan", "false"), resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.sample_refresh_interval_bi_connector", "310"), resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.sample_size_bi_connector", "110"), + resource.TestCheckResourceAttr(resourceName, "advanced_configuration.0.default_max_time_ms", "65"), resource.TestCheckResourceAttr(resourceName, "bi_connector_config.0.enabled", "false"), resource.TestCheckResourceAttr(resourceName, "bi_connector_config.0.read_preference", "secondary"), ), diff --git a/internal/service/advancedcluster/resource_advanced_cluster_test.go b/internal/service/advancedcluster/resource_advanced_cluster_test.go index 93f56dd83e..4f863ca23e 100644 --- a/internal/service/advancedcluster/resource_advanced_cluster_test.go +++ b/internal/service/advancedcluster/resource_advanced_cluster_test.go @@ -219,15 +219,15 @@ func TestAccClusterAdvancedCluster_pausedToUnpaused(t *testing.T) { }) } -func TestAccClusterAdvancedCluster_advancedConfig(t *testing.T) { +func TestAccClusterAdvancedCluster_advancedConfig_oldMongoDBVersion(t *testing.T) { // TODO: Already prepared for TPF but getting this error: // unexpected new value: .advanced_configuration.fail_index_key_too_long: was cty.False, but now null acc.SkipIfAdvancedClusterV2Schema(t) var ( - projectID = acc.ProjectIDExecution(t) - clusterName = acc.RandomClusterName() - clusterNameUpdated = acc.RandomClusterName() - processArgs = &admin20240530.ClusterDescriptionProcessArgs{ + projectID = acc.ProjectIDExecution(t) + clusterName = acc.RandomClusterName() + + processArgs20240530 = &admin20240530.ClusterDescriptionProcessArgs{ DefaultReadConcern: conversion.StringPtr("available"), DefaultWriteConcern: conversion.StringPtr("1"), FailIndexKeyTooLong: conversion.Pointer(false), @@ -239,7 +239,52 @@ func TestAccClusterAdvancedCluster_advancedConfig(t *testing.T) { SampleSizeBIConnector: conversion.Pointer(110), TransactionLifetimeLimitSeconds: conversion.Pointer[int64](300), } - processArgsUpdated = &admin20240530.ClusterDescriptionProcessArgs{ + processArgs = &admin.ClusterDescriptionProcessArgs20240805{ + ChangeStreamOptionsPreAndPostImagesExpireAfterSeconds: conversion.IntPtr(-1), // this will not be set in the TF configuration + DefaultMaxTimeMS: conversion.IntPtr(65), + } + ) + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: acc.PreCheckBasicSleep(t, nil, projectID, clusterName), + ProtoV6ProviderFactories: acc.TestAccProviderV6Factories, + CheckDestroy: acc.CheckDestroyCluster, + Steps: []resource.TestStep{ + { + Config: configAdvanced(projectID, clusterName, "6.0", processArgs20240530, processArgs), + ExpectError: regexp.MustCompile(advancedcluster.ErrorDefaultMaxTimeMinVersion), + }, + { + Config: configAdvanced(projectID, clusterName, "6.0", processArgs20240530, &admin.ClusterDescriptionProcessArgs20240805{}), + Check: checkAdvanced(clusterName, "TLS1_1", &admin.ClusterDescriptionProcessArgs20240805{}), + }, + }, + }) +} + +func TestAccClusterAdvancedCluster_advancedConfig(t *testing.T) { + acc.SkipIfAdvancedClusterV2Schema(t) + var ( + projectID = acc.ProjectIDExecution(t) + clusterName = acc.RandomClusterName() + clusterNameUpdated = acc.RandomClusterName() + processArgs20240530 = &admin20240530.ClusterDescriptionProcessArgs{ + DefaultReadConcern: conversion.StringPtr("available"), + DefaultWriteConcern: conversion.StringPtr("1"), + FailIndexKeyTooLong: conversion.Pointer(false), + JavascriptEnabled: conversion.Pointer(true), + MinimumEnabledTlsProtocol: conversion.StringPtr("TLS1_1"), + NoTableScan: conversion.Pointer(false), + OplogSizeMB: conversion.Pointer(1000), + SampleRefreshIntervalBIConnector: conversion.Pointer(310), + SampleSizeBIConnector: conversion.Pointer(110), + TransactionLifetimeLimitSeconds: conversion.Pointer[int64](300), + } + processArgs = &admin.ClusterDescriptionProcessArgs20240805{ + ChangeStreamOptionsPreAndPostImagesExpireAfterSeconds: conversion.IntPtr(-1), // this will not be set in the TF configuration + } + + processArgs20240530Updated = &admin20240530.ClusterDescriptionProcessArgs{ DefaultReadConcern: conversion.StringPtr("available"), DefaultWriteConcern: conversion.StringPtr("0"), FailIndexKeyTooLong: conversion.Pointer(false), @@ -251,6 +296,10 @@ func TestAccClusterAdvancedCluster_advancedConfig(t *testing.T) { SampleSizeBIConnector: conversion.Pointer(110), TransactionLifetimeLimitSeconds: conversion.Pointer[int64](300), } + processArgsUpdated = &admin.ClusterDescriptionProcessArgs20240805{ + DefaultMaxTimeMS: conversion.IntPtr(65), + ChangeStreamOptionsPreAndPostImagesExpireAfterSeconds: conversion.IntPtr(100), + } ) resource.ParallelTest(t, resource.TestCase{ @@ -259,12 +308,12 @@ func TestAccClusterAdvancedCluster_advancedConfig(t *testing.T) { CheckDestroy: acc.CheckDestroyCluster, Steps: []resource.TestStep{ { - Config: acc.ConvertAdvancedClusterToTPF(t, configAdvanced(projectID, clusterName, processArgs, nil)), - Check: checkAdvanced(clusterName, "TLS1_1", "-1"), + Config: acc.ConvertAdvancedClusterToTPF(t, configAdvanced(projectID, clusterName, "", processArgs20240530, processArgs)), + Check: checkAdvanced(clusterName, "TLS1_1", processArgs), }, { - Config: acc.ConvertAdvancedClusterToTPF(t, configAdvanced(projectID, clusterNameUpdated, processArgsUpdated, conversion.IntPtr(100))), - Check: checkAdvanced(clusterNameUpdated, "TLS1_2", "100"), + Config: acc.ConvertAdvancedClusterToTPF(t, configAdvanced(projectID, clusterNameUpdated, "", processArgs20240530Updated, processArgsUpdated)), + Check: checkAdvanced(clusterNameUpdated, "TLS1_2", processArgsUpdated), }, }, }) @@ -1396,16 +1445,29 @@ func checkSingleProviderPaused(name string, paused bool) resource.TestCheckFunc "paused": strconv.FormatBool(paused)}) } -func configAdvanced(projectID, clusterName string, p *admin20240530.ClusterDescriptionProcessArgs, changeStreamOptions *int) string { +func configAdvanced(projectID, clusterName, mongoDBMajorVersion string, p20240530 *admin20240530.ClusterDescriptionProcessArgs, p *admin.ClusterDescriptionProcessArgs20240805) string { changeStreamOptionsString := "" - if changeStreamOptions != nil { - changeStreamOptionsString = fmt.Sprintf(`change_stream_options_pre_and_post_images_expire_after_seconds = %[1]d`, *changeStreamOptions) + defaultMaxTimeString := "" + mongoDBMajorVersionString := "" + + if p != nil { + if p.ChangeStreamOptionsPreAndPostImagesExpireAfterSeconds != nil && p.ChangeStreamOptionsPreAndPostImagesExpireAfterSeconds != conversion.IntPtr(-1) { + changeStreamOptionsString = fmt.Sprintf(`change_stream_options_pre_and_post_images_expire_after_seconds = %[1]d`, *p.ChangeStreamOptionsPreAndPostImagesExpireAfterSeconds) + } + if p.DefaultMaxTimeMS != nil { + defaultMaxTimeString = fmt.Sprintf(`default_max_time_ms = %[1]d`, *p.DefaultMaxTimeMS) + } + } + if mongoDBMajorVersion != "" { + mongoDBMajorVersionString = fmt.Sprintf(`mongo_db_major_version = %[1]q`, mongoDBMajorVersion) } + return fmt.Sprintf(` resource "mongodbatlas_advanced_cluster" "test" { project_id = %[1]q name = %[2]q cluster_type = "REPLICASET" + %[13]s replication_specs { region_configs { @@ -1433,6 +1495,7 @@ func configAdvanced(projectID, clusterName string, p *admin20240530.ClusterDescr sample_refresh_interval_bi_connector = %[9]d transaction_lifetime_limit_seconds = %[10]d %[11]s + %[12]s } } @@ -1445,11 +1508,32 @@ func configAdvanced(projectID, clusterName string, p *admin20240530.ClusterDescr project_id = mongodbatlas_advanced_cluster.test.project_id } `, projectID, clusterName, - p.GetFailIndexKeyTooLong(), p.GetJavascriptEnabled(), p.GetMinimumEnabledTlsProtocol(), p.GetNoTableScan(), - p.GetOplogSizeMB(), p.GetSampleSizeBIConnector(), p.GetSampleRefreshIntervalBIConnector(), p.GetTransactionLifetimeLimitSeconds(), changeStreamOptionsString) -} + p20240530.GetFailIndexKeyTooLong(), p20240530.GetJavascriptEnabled(), p20240530.GetMinimumEnabledTlsProtocol(), p20240530.GetNoTableScan(), + p20240530.GetOplogSizeMB(), p20240530.GetSampleSizeBIConnector(), p20240530.GetSampleRefreshIntervalBIConnector(), p20240530.GetTransactionLifetimeLimitSeconds(), + changeStreamOptionsString, defaultMaxTimeString, mongoDBMajorVersionString) +} + +func checkAdvanced(name, tls string, processArgs *admin.ClusterDescriptionProcessArgs20240805) resource.TestCheckFunc { + advancedConfig := map[string]string{ + "name": name, + "advanced_configuration.0.minimum_enabled_tls_protocol": tls, + "advanced_configuration.0.fail_index_key_too_long": "false", + "advanced_configuration.0.javascript_enabled": "true", + "advanced_configuration.0.no_table_scan": "false", + "advanced_configuration.0.oplog_size_mb": "1000", + "advanced_configuration.0.sample_refresh_interval_bi_connector": "310", + "advanced_configuration.0.sample_size_bi_connector": "110", + "advanced_configuration.0.transaction_lifetime_limit_seconds": "300", + } + + if processArgs.ChangeStreamOptionsPreAndPostImagesExpireAfterSeconds != nil { + advancedConfig["advanced_configuration.0.change_stream_options_pre_and_post_images_expire_after_seconds"] = strconv.Itoa(*processArgs.ChangeStreamOptionsPreAndPostImagesExpireAfterSeconds) + } + + if processArgs.DefaultMaxTimeMS != nil { + advancedConfig["advanced_configuration.0.default_max_time_ms"] = strconv.Itoa(*processArgs.DefaultMaxTimeMS) + } -func checkAdvanced(name, tls, changeStreamOptions string) resource.TestCheckFunc { pluralChecks := []resource.TestCheckFunc{ resource.TestCheckResourceAttrSet(dataSourcePluralName, "results.#"), resource.TestCheckResourceAttrSet(dataSourcePluralName, "results.0.replication_specs.#"), @@ -1458,20 +1542,12 @@ func checkAdvanced(name, tls, changeStreamOptions string) resource.TestCheckFunc if config.AdvancedClusterV2Schema() { // TODO: data sources not implemented for TPF yet pluralChecks = nil } + return checkAggr( []string{"project_id", "replication_specs.#", "replication_specs.0.region_configs.#"}, - map[string]string{ - "name": name, - "advanced_configuration.0.minimum_enabled_tls_protocol": tls, - "advanced_configuration.0.fail_index_key_too_long": "false", - "advanced_configuration.0.javascript_enabled": "true", - "advanced_configuration.0.no_table_scan": "false", - "advanced_configuration.0.oplog_size_mb": "1000", - "advanced_configuration.0.sample_refresh_interval_bi_connector": "310", - "advanced_configuration.0.sample_size_bi_connector": "110", - "advanced_configuration.0.transaction_lifetime_limit_seconds": "300", - "advanced_configuration.0.change_stream_options_pre_and_post_images_expire_after_seconds": changeStreamOptions}, - pluralChecks...) + advancedConfig, + pluralChecks..., + ) } func configAdvancedDefaultWrite(projectID, clusterName string, p *admin20240530.ClusterDescriptionProcessArgs) string { diff --git a/internal/service/advancedclustertpf/README.md b/internal/service/advancedclustertpf/README.md index 8275f6fd58..5a997ed387 100644 --- a/internal/service/advancedclustertpf/README.md +++ b/internal/service/advancedclustertpf/README.md @@ -6,4 +6,6 @@ This package contains the WIP for `mongodbatlas_advanced_cluster` in TPF. Curren ## Changes in advancedcluster that needs to be added here (list changes done in advancedcluster which couldn't also be done here at that moment) +- [PR #2825](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/2825) Add new `advanced_configuration.0.default_max_time_ms` attribute to mongodbatlas_advanced_cluster resource and data sources. +