Azure / bicep-types-az

Bicep type definitions for ARM resources
MIT License
86 stars 27 forks source link

KeyVault: Defining accessPolicies with tenant().tenantID #1368

Open Steve-MSFT opened 1 year ago

Steve-MSFT commented 1 year ago

Resource Type

Microsoft.KeyVault/vaults@2022-07-01

Api Version

2022-07-01

Issue Type

Inaccurate property type(s)

Other Notes

Attempting to set the the tenantID as defined here: https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/bicep-functions-scope#tenant-example

Received the following msg:

The specified "object" declaration is missing the following required properties: "tenantId". If this is an inaccuracy in the documentation, please report it to the Bicep Team.bicephttps://aka.ms/bicep-type-issues

Bicep Repro

resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' = {
  name: 'kustoFunction'
  location: location
  properties: {
    accessPolicies: [
      {
        applicationId: deploymentAgentId
        objectId: deploymentAgentObjectId
        tenantId: tenant().tenantId
        permissions: {
          certificates: [
            'get'
            'getissuers'
            'list'
            'listissuers'
          ]

        }

      }
    ]
    sku: {
      family: 'A'
      name: 'standard'
    }
  }
}

Confirm

ghost commented 1 year ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @RandalliLama, @schaabs, @jlichwa. Please see https://aka.ms/biceptypesinfo for troubleshooting help.

Issue Details
### Resource Type Microsoft.KeyVault/vaults@2022-07-01 ### Api Version 2022-07-01 ### Issue Type Inaccurate property type(s) ### Other Notes Attempting to set the the tenantID as defined here: https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/bicep-functions-scope#tenant-example Received the following msg: The specified "object" declaration is missing the following required properties: "tenantId". If this is an inaccuracy in the documentation, please report it to the Bicep Team.bicephttps://aka.ms/bicep-type-issues ### Bicep Repro ```bicep resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' = { name: 'kustoFunction' location: location properties: { accessPolicies: [ { applicationId: deploymentAgentId objectId: deploymentAgentObjectId tenantId: tenant().tenantId permissions: { certificates: [ 'get' 'getissuers' 'list' 'listissuers' ] } } ] sku: { family: 'A' name: 'standard' } } } ``` ### Confirm - [X] I have searched this repository and have not found similar issue reports.
Author: Steve-MSFT
Assignees: -
Labels: `inaccuracy`, `RP: Microsoft.KeyVault`, `Service Attention`, `KeyVault`
Milestone: -