共用方式為


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>?

範例

下列範例會引發錯誤,因為 名稱廣告 看起來像錯字。

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 警告和錯誤