Closed jagregory closed 6 years ago
Hey @jagregory looking into this now. Although I've not escaped the slash in the test, I did escape the path in the Get
implementation of whitelist itself:
escapedIP := url.PathEscape(ip)
path := fmt.Sprintf("%s/whitelist/%s", gid, escapedIP)
I'll continue looking into akshaykarle/terraform-provider-mongodbatlas#16 to see if there is something else I'm missing. Let me know if there is something else you may have noticed.
I suspect this is the root cause of: https://github.com/akshaykarle/terraform-provider-mongodbatlas/issues/16
According to the MongoDB Atlas docs, the / in CIDR blocks should be URL encoded when requesting Whitelist resources: https://docs.atlas.mongodb.com/reference/api/whitelist/#get-the-entry-for-a-specific-address-in-a-group-s-ip-whitelist
Looking at the whitelist tests, the mux stub is being set up incorrectly without the slash encoded.