diff --git a/internal/services/keyvault/key_vault_key_resource.go b/internal/services/keyvault/key_vault_key_resource.go index 4eafbaba1e65..610ef37eccee 100644 --- a/internal/services/keyvault/key_vault_key_resource.go +++ b/internal/services/keyvault/key_vault_key_resource.go @@ -256,6 +256,12 @@ func resourceKeyVaultKey() *pluginsdk.Resource { "tags": tags.Schema(), }, + + CustomizeDiff: pluginsdk.CustomDiffWithAll( + pluginsdk.ForceNewIfChange("expiration_date", func(ctx context.Context, old, new, meta interface{}) bool { + return old.(string) != "" && new.(string) == "" + }), + ), } }