Skip to content

Commit 93e2996

Browse files
authored
fix: 'computed' and 'default' usage based on the documentation (#1564)
* fixes 'computed' and 'default' attribute usage based on the documentation. * restores computed=true for nested blocks (not fixing the issue).
1 parent da54cce commit 93e2996

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

mongodbatlas/resource_mongodbatlas_cluster.go

+3-6
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func resourceMongoDBAtlasCluster() *schema.Resource {
7979
"backup_enabled": {
8080
Type: schema.TypeBool,
8181
Optional: true,
82-
Default: false,
82+
Computed: true,
8383
Description: "Clusters running MongoDB FCV 4.2 or later and any new Atlas clusters of any type do not support this parameter",
8484
},
8585
"retain_backups_enabled": {
@@ -293,7 +293,7 @@ func resourceMongoDBAtlasCluster() *schema.Resource {
293293
"paused": {
294294
Type: schema.TypeBool,
295295
Optional: true,
296-
Default: false,
296+
Computed: true,
297297
},
298298
"srv_address": {
299299
Type: schema.TypeString,
@@ -308,19 +308,16 @@ func resourceMongoDBAtlasCluster() *schema.Resource {
308308
Type: schema.TypeSet,
309309
Optional: true,
310310
Set: HashFunctionForKeyValuePair,
311-
Computed: true,
312311
Deprecated: fmt.Sprintf(DeprecationByDateWithReplacement, "September 2024", "tags"),
313312
Elem: &schema.Resource{
314313
Schema: map[string]*schema.Schema{
315314
"key": {
316315
Type: schema.TypeString,
317316
Optional: true,
318-
Computed: true,
319317
},
320318
"value": {
321319
Type: schema.TypeString,
322320
Optional: true,
323-
Computed: true,
324321
},
325322
},
326323
},
@@ -339,7 +336,7 @@ func resourceMongoDBAtlasCluster() *schema.Resource {
339336
"version_release_system": {
340337
Type: schema.TypeString,
341338
Optional: true,
342-
Default: "LTS",
339+
Computed: true,
343340
ValidateFunc: validation.StringInSlice([]string{"LTS", "CONTINUOUS"}, false),
344341
},
345342
},

0 commit comments

Comments
 (0)