rapid-football-4431807/11/2022, 2:46 PM
echoing-dinner-1953107/13/2022, 10:36 AM
It appears that any non-Pulumi app settings are getting wiped even when Pulumi indicates that it will not be updating the App Settings.That's expected. Pulumi (like other IAC tools) assumes it's the only one managing the resources and so will try to make the resource state match exactly the state declared by the program. If you add a setting manually, but not to the program Pulumi will correct that drift.
This was a Pulumi Preview --diff for a function app of mine. No AppSetting changes indicated. I did the Pulumi Up and all existing App Settings were deleted. Very annoying!! This was after doing a Refresh and then also an Import to ensure all existing settings were discovered. However it does not appear that AppSettings are gathered into state using either.I'm surprised that refresh didn't pick up the manually added settings. If it add then diff would of correctly shown that there we're going to be changes applied. Can you raise a bug about that at https://github.com/pulumi/pulumi-azure-native/issues.
worried-autumn-2045207/13/2022, 5:06 PM
echoing-dinner-1953107/13/2022, 6:01 PM
Regarding the AppSettings, if I do not add a value for them in Pulumi, are you suggesting that Pulumi should then want to delete any that have been added by other methods?I'd think so. There are a few odd resources where when we send state the cloud provider will concatenate that state rather than replace, but mostly what's in the pulumi program is exactly what ends up in the cloud.