Closed Werewolfkiss closed 9 months ago
Thanks for raising your first issue, the team appreciates the time you have taken 😉
Thanks for reporting the issue @Werewolfkiss.
Are you able to provide a sample implementation of ../../../vdl-ets-backoffice/features/Security/Key Vault/v1.2/templates/keyvault.accesspolicies.bicep
that we can use to reproduce the issue?
Doesn't need to be your full internal implementation, just enough of it that fails similarly to the issue you've report. Thanks.
@BernieWhite Yea no problem its just a module because of scope nothing else so
param keyVaultName string
param accessPolicies array
resource ap 'Microsoft.KeyVault/vaults/accessPolicies@2022-07-01' = {
name: '${keyVaultName}/add'
properties: {
accessPolicies: accessPolicies
}
}
Hi @Werewolfkiss. This should be fixed in PSRule for Azure v1.32.1.
Description of the issue
Get a cast exception when trying to union a keyvault access policy.
To Reproduce
Have bicep template trying to add an access policy to a keyvault while preserving existing policies. In the below bicep if you replace the accessPolicies param with either existingAccessPolicies or newAccessPolicies the expansion works fine.
Expected behaviour
No issues expanding template
Error output
Module in use and version:
Module: PSRule
Version: 2.9.0
Module: PSRule.Rules.Azure
Version: 1.31.0
Captured output from
$PSVersionTable
: