Skip to content

Hour and minute properties don't update when they are zero for mongodbatlas_cloud_provider_snapshot_backup_policy #211

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
michelzanini opened this issue Apr 28, 2020 · 2 comments · Fixed by #230
Labels

Comments

@michelzanini
Copy link

Hi,

When the resource mongodbatlas_cloud_provider_snapshot_backup_policy has reference_hour_of_day or reference_minute_of_hour set to 0, it never updates Atlas.

For example, if they configuration is like this:

resource "mongodbatlas_cloud_provider_snapshot_backup_policy" "backup_policy" {
(...)
  reference_hour_of_day    = 0
  reference_minute_of_hour = 0
  restore_window_days      = 3
(...)

The policy always comes back as a change is required:

~ reference_hour_of_day    = 17 -> 0
~ reference_minute_of_hour = 21 -> 0

And when applying it never changes Atlas to midnight. It always stays at the time it was before, in this case 17:21...

If I use numbers different than 0 for this properties it all works correctly.
I have not investigated if restore_window_days has the same issue.

Can this be fixed?
Thanks.

@michelzanini
Copy link
Author

michelzanini commented Apr 28, 2020

I am using version 0.5.1 of the provider, Terraform version 0.12.16

@themantissa
Copy link
Collaborator

And confirmed - also a bug. Cannot set values to zero (midnight).

gmlp added a commit that referenced this issue Jun 8, 2020
fix: fixes #211 hour and minute don't update when they are zero
@gmlp gmlp closed this as completed in #230 Jun 8, 2020
gmlp added a commit that referenced this issue Jun 8, 2020
…inute-dont-update-when-they-are-zero

fixes #211: Hour and minute properties don't update when they are zero for mongodbatlas_cloud_provider_snapshot_backup_policy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants