Skip to content

Commit f628755

Browse files
authored
fix: handles attributes as computed. (#1642)
* fix: handles attributes as computed. * acceptance tests with 1.0.8. * Revert "acceptance tests with 1.0.8." This reverts commit dcfee89. * test. * test. * test. * test.
1 parent 4a24fdc commit f628755

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

mongodbatlas/resource_mongodbatlas_cluster.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ func resourceMongoDBAtlasCluster() *schema.Resource {
6363
},
6464
"auto_scaling_disk_gb_enabled": {
6565
Type: schema.TypeBool,
66-
Default: true,
66+
Computed: true,
6767
Optional: true,
6868
},
6969
"auto_scaling_compute_enabled": {
@@ -343,6 +343,7 @@ func resourceMongoDBAtlasCluster() *schema.Resource {
343343
"accept_data_risks_and_force_replica_set_reconfig": {
344344
Type: schema.TypeString,
345345
Optional: true,
346+
Computed: true,
346347
Description: "Submit this field alongside your topology reconfiguration to request a new regional outage resistant topology",
347348
},
348349
},

mongodbatlas/resource_mongodbatlas_cluster_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ func TestAccClusterRSCluster_basicAWS_simple(t *testing.T) {
4646
resource.TestCheckResourceAttr(resourceName, "pit_enabled", "true"),
4747
resource.TestCheckResourceAttr(resourceName, "retain_backups_enabled", "true"),
4848
resource.TestCheckResourceAttr(resourceName, "version_release_system", "LTS"),
49+
resource.TestCheckResourceAttr(resourceName, "accept_data_risks_and_force_replica_set_reconfig", ""),
50+
resource.TestCheckResourceAttr(resourceName, "auto_scaling_disk_gb_enabled", "true"),
4951
),
5052
},
5153
{
@@ -62,6 +64,7 @@ func TestAccClusterRSCluster_basicAWS_simple(t *testing.T) {
6264
resource.TestCheckResourceAttrSet(resourceName, "replication_specs.0.regions_config.#"),
6365
resource.TestCheckResourceAttr(resourceName, "retain_backups_enabled", "true"),
6466
resource.TestCheckResourceAttr(resourceName, "version_release_system", "LTS"),
67+
resource.TestCheckResourceAttr(resourceName, "auto_scaling_disk_gb_enabled", "false"),
6568
),
6669
},
6770
},

0 commit comments

Comments
 (0)