akshaykarle / terraform-provider-mongodbatlas

Terraform provider for MongoDB Atlas
Mozilla Public License 2.0
122 stars 54 forks source link

Whitelists accidentally removed via GUI should be recreated #62

Open Stono opened 5 years ago

Stono commented 5 years ago

Hi, We had a situation today where some whitelists were removed by a program other than terraform. This was an error, and we had hoped that re-running terraform would simply recognise their omission and recreate them.

Instead we got this:

* module.mongodb-atlas.mongodbatlas_ip_whitelist.ip_whitelist[1]: mongodbatlas_ip_whitelist.ip_whitelist.1: Error reading MongoDB Project IP Whitelist ip-range/32: MongoDB Atlas: 404 IP Address ip-range/32 not on Atlas whitelist for group <some-group-id>.

It would be great in this scenario if the object was just marked as tainted/needing recreation?

holms commented 5 years ago

@akshaykarle this is actually crucial :) I mean having idempotence is the point of terraform.