-
Notifications
You must be signed in to change notification settings - Fork 764
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RecoveryVault cannot deploy #2336
Comments
@Agazoth - would you mind providing an example of the full Bicep file + parameters used to deploy this resource generated from the snippet you linked? |
@anthony-c-martin actually just hard coding strings in the main.bicep file like this:: resource recoveryServiceVault 'Microsoft.RecoveryServices/vaults@2021-01-01' = {
name: 'axtestrecvault'
location: resourceGroup().location
sku: {
name: 'RS0'
tier: 'Standard'
}
} And running: New-AzResourceGroupDeployment -ResourceGroupName rg-smo-axtest -Name testdeployrecvault -TemplateFile .\main.bicep |
@Agazoth - this is not a Bicep specific error . Although there is no required property for a Recovery Services Vault, you need to add an empty properties object to your template for the API to accept it. This will work: resource recoveryServiceVault 'Microsoft.RecoveryServices/vaults@2021-01-01' = {
name: 'axtestrecvault'
location: resourceGroup().location
sku: {
name: 'RS0'
tier: 'Standard'
}
properties: {}
} @anthony-c-martin - I will create a PR fixing this snippet. |
Thanks, adding an empty properties object fixed it. |
It worked for me as well all we need to do is add empty property and it will work |
Bicep 0.3.228
https://github.com/Azure/bicep/blob/81fa2c2c5044e3c3a8a973379f7d776a6ca4a92a/src/Bicep.LangServer/Snippets/Templates/res-recovery-service-vault.bicep
cannot deploy.
The text was updated successfully, but these errors were encountered: