https://pulumi.com logo
#azure
Title
# azure
b

bulky-oil-97030

02/16/2024, 12:59 PM
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

adventurous-butcher-54166

02/16/2024, 11:49 PM
Have you tried adding this paramer to the pulumi.ResourceOptions ignore_changes parameter?
c

clever-sunset-76585

02/23/2024, 4:21 AM
☝️ 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

bulky-oil-97030

03/07/2024, 8:49 AM
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.