Skip to content

Commit

Permalink
empty more cluster read only fields before update
Browse files Browse the repository at this point in the history
  • Loading branch information
akshaykarle committed Jan 11, 2018
1 parent 6e782e5 commit ca52900
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mongodbatlas/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,9 @@ func resourceClusterUpdate(d *schema.ResourceData, meta interface{}) error {
// Set read-only fields to an empty string to make the API happy
c.StateName = ""
c.MongoDBVersion = ""
c.MongoURI = ""
c.MongoURIWithOptions = ""
c.MongoURIUpdated = ""
_, _, err := client.Clusters.Update(d.Get("group").(string), d.Get("name").(string), c)
if err != nil {
return fmt.Errorf("Error reading MongoDB Cluster %s: %s", d.Get("name").(string), err)
Expand Down

0 comments on commit ca52900

Please sign in to comment.