You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用Azure Bicep部署Redis时,连续部署失败问题

Azure Redis连续部署报错"NotModified"及InternalServerError问题处理

首次部署以下Bicep定义的Redis缓存时一切正常,但连续部署失败,报错信息提示The unknown resource response code 'NotModified' is encountered,同时Azure门户中该资源状态显示为InternalServerError。

部署的Bicep代码

resource redis 'Microsoft.Cache/redis@2023-08-01' = {
  location: 'westeurope'
  name: 'name-redis'
  tags: {
    displayName: 'Redis'
  }
  properties: {
    redisVersion: '6.0'
    sku: {
      name: 'Standard'
      family: 'C'
      capacity: 0
    }
    enableNonSslPort: false
    publicNetworkAccess: 'Enabled'
    redisConfiguration: {
      'maxmemory-reserved': '30'
      'maxfragmentationmemory-reserved': '30'
      'maxmemory-delta': '30'
    }
    updateChannel: 'Stable'
  }
}

报错信息

{
  "code": "ResourceDeploymentFailure",
  "target": "/subscriptions/x/resourceGroups/x/providers/Microsoft.Cache/redis/name-redis",
  "message": "The unknown resource response code 'NotModified' is encountered."
}

可能的解决方法

  • 移除不可变更属性:redisVersion在Redis资源创建后无法修改,连续部署时可从Bicep中移除该属性,避免触发不必要的校验逻辑
  • 临时调整SKU容量:将SKU的capacity从0改为1,完成部署后再改回0,绕过可能的内部校验异常
  • 重置资源状态:先备份Redis数据,删除现有异常资源后重新部署
  • 检查区域服务健康:确认西欧洲区域的Azure Redis服务是否存在临时故障,待服务恢复后再尝试部署
  • 添加条件部署逻辑:在Bicep中设置判断条件,仅当资源不存在时执行创建操作,存在时跳过更新

内容的提问来源于stack exchange,提问作者Jocke

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.02 19:43:19