Closed borfig closed 4 years ago
Ack'ed @borfig - pinging the developers now for triage.
Hello, @borfig I tried to recreate the issue creating the above TF configuration cluster and later switching to the new version and do terraform plan
and I didn't get any error, what's the TF version are you using?
Also, could you share your log? you can use the following command: TF_LOG=DEBUG terraform plan |& tee log.txt
@borfig (@dordadush @alonkol - who also ack'ed the report) - if one of you who is having the error can provide the requested details from PacoDW above, that will help us a great deal.
I am using Terraform v0.12.23
Here is the relevant grep plugin.terraform-provider-mongodbatlas
output (our Terraform file is huge...)
mongodbatlas.txt
@borfig I made a small change to fix that you can see the details on the PR #203 , also could you test it to check if it works fine for you?
Let me know if the issue persists or you have another comment or concern.
@PacoDw the proposed fix works in my case
@borfig I'm happy to hear that, thank you so much for all :)
@borfig per your comment "It appears that relevant API returns HTTP 404 if no cloud provider snapshots are available, which will be also the case when I would decide to add a cloud provider snapshot later." The later part of the statement is not true, if you add cloud provider backup later you automatically get a default policy (see the underlying API here - only a GET/PATCH - https://docs.atlas.mongodb.com/reference/api/snapshot-schedule/). This made this a particularly tricky resources to bring into terraform.
Thank you for working w/ us to resolve this!
@themantissa regarding my comment - if I decide to use Cloud Provider Snapshots via Terraform:
null_resource
-based provisioningplan
or apply
I have to enable cloud provider backups manually via API or Console.Both options are not ideal...
@PacoDw you are welcome
@PacoDw @themantissa I got the same error with the Azure provider. Here are the list of provider verisons Terraform v0.12.24
resource "mongodbatlas_cluster" "this" {
project_id = "
It is working fine if I set flag backup_enabled = true. If it is false the it is throwing an error message
@shekar0523 thank you - the fix we have should correct this as well and will be out in a hotfix 0.5.1 soon.
@themantissa Do you know when we can expect to get that hotfix to release ?
@shekar0523 it released yesterday. I'll close this ticket shortly.
Hello, @shekar0523 I tested with the new release with your shared TF configuration, and I didn't get any errors :)
@borfig back to your comment -
if I decide to use Cloud Provider Snapshots via Terraform: with the previous version of the module, I would have to use null_resource-based provisioning with the 0.5.0 version of the module, in order to run plan or apply I have to enable cloud provider backups manually via API or Console.
This is not quite the case if I understand what you are saying. The way this was spec'ed one just needs to set the variable for cloud provider snapshots in the config to true and that will enable them and, basically, import the initial schedule that is automatically created and if you want to modify it you can by creating a resource for that. Otherwise it uses the default.
0.5.1 corrects this issue but feel free to reach out if any questions remain. Thank you all.
I have a MongoDB cluster managed with Terraform, with no backup enabled:
The cluster was created using an earlier version of this module, but when running
plan
orapply
with the new version, I get:It appears that relevant API returns
HTTP 404
if no cloud provider snapshots are available, which will be also the case when I would decide to add a cloud provider snapshot later.My current work-around is not to upgrade to the new version.