Skip to content

Commit

Permalink
fix: handles attributes as computed. (#1642)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
marcosuma committed Nov 21, 2023
1 parent 4a24fdc commit f628755
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mongodbatlas/resource_mongodbatlas_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func resourceMongoDBAtlasCluster() *schema.Resource {
},
"auto_scaling_disk_gb_enabled": {
Type: schema.TypeBool,
Default: true,
Computed: true,
Optional: true,
},
"auto_scaling_compute_enabled": {
Expand Down Expand Up @@ -343,6 +343,7 @@ func resourceMongoDBAtlasCluster() *schema.Resource {
"accept_data_risks_and_force_replica_set_reconfig": {
Type: schema.TypeString,
Optional: true,
Computed: true,
Description: "Submit this field alongside your topology reconfiguration to request a new regional outage resistant topology",
},
},
Expand Down
3 changes: 3 additions & 0 deletions mongodbatlas/resource_mongodbatlas_cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ func TestAccClusterRSCluster_basicAWS_simple(t *testing.T) {
resource.TestCheckResourceAttr(resourceName, "pit_enabled", "true"),
resource.TestCheckResourceAttr(resourceName, "retain_backups_enabled", "true"),
resource.TestCheckResourceAttr(resourceName, "version_release_system", "LTS"),
resource.TestCheckResourceAttr(resourceName, "accept_data_risks_and_force_replica_set_reconfig", ""),
resource.TestCheckResourceAttr(resourceName, "auto_scaling_disk_gb_enabled", "true"),
),
},
{
Expand All @@ -62,6 +64,7 @@ func TestAccClusterRSCluster_basicAWS_simple(t *testing.T) {
resource.TestCheckResourceAttrSet(resourceName, "replication_specs.0.regions_config.#"),
resource.TestCheckResourceAttr(resourceName, "retain_backups_enabled", "true"),
resource.TestCheckResourceAttr(resourceName, "version_release_system", "LTS"),
resource.TestCheckResourceAttr(resourceName, "auto_scaling_disk_gb_enabled", "false"),
),
},
},
Expand Down

0 comments on commit f628755

Please sign in to comment.