kind-state-72086
06/16/2026, 10:37 AMbrave-planet-10645
06/16/2026, 12:33 PMEnabling this functionality is irreversible - that is, the property does not accept false as its value. statement as "if you create this resource with this input set to true, you cannot update the resource later to set it to be false".
Since the EnablePurgeProtection is nullable, if you left it out (i.e. didn't set it at all) then this is the same as disabling the purge protection.
What is your end goal here? Are you trying to create a new vault that has purge protection turned off?kind-state-72086
06/16/2026, 2:23 PMkind-state-72086
06/16/2026, 2:27 PMpulumi import on a KeyVault in Azure which already exists. This KeyVault was manually created and had PurgeProtection = Disabled as property.
After pulumi import all properties and settings were exported into a class except for PurgeProtection. I don't know why that is. But it immediately made me think, is the provider behaving in a way where it always assumes the setting is False? How does the AzureNative provider treat this property?
Such questions immediately arose after that observation.brave-planet-10645
06/16/2026, 3:07 PMbrave-planet-10645
06/16/2026, 3:08 PMEnablePurgeProtection input altogether, I get this:brave-planet-10645
06/16/2026, 3:09 PMnull (in csharp), but once it's true then that's it - you can't change it to not be truekind-state-72086
06/16/2026, 4:17 PMEnablePurgeProtection then I am in shock. My understanding was that explicitly setting EnablePurgeProtection = false in .NET that it would THEN create a KeyVault with the setting disabled as seen in your second screenshot.
My issue is that I defined a brand new KeyVault with EnablePurgeProtection = false and a name that does not exist, thereby showing in the urn that the KeyVault is in [create] status. However when pulumi up attempts to create the KeyVault, it fails stating that the value cannot be changed. But I am creating a brand new keyvault, I am not 'changing' anything.
Please correct me if I misunderstood and thanks a lot for replying, I really appreciate it!brave-planet-10645
06/17/2026, 7:35 PMEnablePurgeProtection altogether. Which suggests that the azure api sees the default value as “false”.
I don't believe it is possible to create a vault with that input set to false. What was the error message that you got when you tried to run pulumi up with it set to false?kind-state-72086
06/17/2026, 8:47 PMEnablePurgeProtection=false does something else?
What I received with it set to false from pulumi up was:
error: Status=400 Code="BadRequest" Message="The property "enablePurgeProtection" cannot be set to false. Enabling the purge protection for a vault is an irreverisible action"
Which is why I suspected that provider must've done a POST then PUT to create the resource. Because that was the first time I tried to create it. In fact I can use any random VaultName or fresh stack and it would happen. In essence, I just want to provision a keyvault with the setting disabled.
Could the POST then PUT be a correct theory?kind-state-72086
06/17/2026, 9:02 PMEnablePurgeProtection altogether and it provisioned as disabled! Thank you so much!
I truly don't understand why setting it to false causes the policy to trigger.brave-planet-10645
06/18/2026, 8:40 AMerror: Status=400 Code="BadRequest" Message="The property "enablePurgeProtection" cannot be set to false. Enabling the purge protection for a vault is an irreverisible action"
That error message comes straight from the API response, so something internal to that is what's not allowing the value to be falsekind-state-72086
06/18/2026, 1:27 PMEnablePurgeProtection=false it triggers the policy because it is then included in the body and saying that it should be false is not allowed. Though the policy clearly states is an irreverisible action which then implies you're modifying the vault. So the provider must be doing a POST then PUT request to ARM, no?
I would love to understand this because I can't imagine anything but it being a pattern for some other resources in the AzureNative provider.brave-planet-10645
06/18/2026, 2:18 PMenablePurgeProtection it literally says "the property does not accept false as its value".
i.e. not a Pulumi decision but an Azure onebrave-planet-10645
06/18/2026, 2:19 PMbrave-planet-10645
06/18/2026, 2:29 PMnull) I can see we just do a straight PUT on it. So not a POST then PUTkind-state-72086
06/18/2026, 4:02 PMPUT then. While I agree with the method of CreateOrUpdate via provider requests but this could cause difficulties in Azure. For instance, in the past we have provisioned a KeyVault with the setting on disabled explicitly. This went fine but in those cases it was a POST.
I suppose that is an important nuance to know.
Piers, genuinely thank you for your effort.