Refresh does not update earliestRestoreDate for az...
# azure
b
Refresh does not update earliestRestoreDate for azure-nativesqlDatabase Hi everyone. We have some
refresh --expect-no-changes
checks in our pipeline to detect infra drift on our DBs. Apparently (and understandably), Azure updates the earliestRestoreDate variable of the DB resource, since this is a rolling backup strategy. When I perform a
pulumi refresh
on the stack, the cli tells me that this variable has been updated on the stack, but when I run another
refresh
, it tells me that the variable needs changing again. Am I doing sth. wrong, is this expected behavior, or is it a bug?
a
Have you tried adding this paramer to the pulumi.ResourceOptions ignore_changes parameter?
c
☝️ that. Also it's not a bug. Pulumi is correctly reporting the diff in your state with what is in Azure. Since
earliestRestoreState
isn't a property you'd ever provide as an input (and probably can't anyway) it's within expectations that you'd want to use the
ignoreChanges
option
b
Thanks for pointing that out, @adventurous-butcher-54166 @clever-sunset-76585. That makes total sense and seems to be the option that we were looking for! 🙏 We'll try the
ignoreChanges
approach.
Update:
ignoreChanges
only applies to inputs. Since
earliestRestoreDate
is an output, it is useless here.