Compartir a través de

Bicep 错误/警告代码 - BCP088

当属性值似乎存在拼写错误时,将发生此错误/警告。

错误/警告说明

The property <property-name> expected a value of type <type-name> but the provided value is of type <type-name>. Did you mean <type-name>?

示例

以下示例会引发错误,因为 namead 似乎存在拼写错误。

resource kv 'Microsoft.KeyVault/vaults@2023-07-01' existing = {
  name: 'vault'
 
  resource ap 'accessPolicies' = {
    name: 'ad'
    properties: {
      accessPolicies: []
    }
  }
}

可以通过更正拼写错误来修复错误:

resource kv 'Microsoft.KeyVault/vaults@2023-07-01' existing = {
  name: 'vault'
 
  resource ap 'accessPolicies' = {
    name: 'add'
    properties: {
      accessPolicies: []
    }
  }
}

后续步骤

有关 Bicep 错误和警告代码的详细信息,请参阅 Bicep 警告和错误