Skip to content
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

Azure Recovery Services Vault InvalidRestApiParameter #702

Open
buysoft opened this issue Nov 10, 2022 · 4 comments
Open

Azure Recovery Services Vault InvalidRestApiParameter #702

buysoft opened this issue Nov 10, 2022 · 4 comments
Labels
resource-provider issue with resource schema for pulled resources triage

Comments

@buysoft
Copy link

buysoft commented Nov 10, 2022

Describe the bug

When deploying the Microsoft.RecoveryServices/vaults resourceType gives the error "InvalidRestApiParameter - properties parameter is invalid. Please provide a valid properties".

Steps to reproduce

  1. Create an Azure Recovery Services Vault
  2. Do a Pull in AzOps
  3. The Push will trigger and the error appears

I even reproduced it by doing the -WhatIf with the JSON-template coming from the AzOps Pull.

Screenshots

image

@buysoft buysoft changed the title Azure Recovery Services InvalidRestApiParameter Azure Recovery Services Vault InvalidRestApiParameter Nov 10, 2022
@StefanIvemo
Copy link
Collaborator

This sounds more like a resource provider issue than AzOps. Can you share your template with us? Although Microsoft.RecoveryServices/vaults have no required properties the RP expects a properties property in the template.

Bicep Example:

resource vault 'Microsoft.RecoveryServices/vaults@2022-09-10' = {
  name: 'myvault'
  location: 'westeurope'
  properties: {}
}

ARM example

{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "resources": [
    {
      "type": "Microsoft.RecoveryServices/vaults",
      "apiVersion": "2022-09-10",
      "name": "myvault",
      "location": "westeurope",
      "properties": {}
    }
  ]

@buysoft
Copy link
Author

buysoft commented Nov 21, 2022

This sounds more like a resource provider issue than AzOps. Can you share your template with us? Although Microsoft.RecoveryServices/vaults have no required properties the RP expects a properties property in the template.

Bicep Example:

resource vault 'Microsoft.RecoveryServices/vaults@2022-09-10' = {
  name: 'myvault'
  location: 'westeurope'
  properties: {}
}

ARM example

{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "resources": [
    {
      "type": "Microsoft.RecoveryServices/vaults",
      "apiVersion": "2022-09-10",
      "name": "myvault",
      "location": "westeurope",
      "properties": {}
    }
  ]

I was not able to share the template at the moment. I will get back to you as soon as possible!

@daltondhcp
Copy link
Contributor

@buys-stash - any updates?

@daltondhcp daltondhcp added the resource-provider issue with resource schema for pulled resources label Jan 18, 2023
@OlafHaalstra
Copy link

In addition to what @buys-stash already mentioned for version @2023-04-01 it is also mandatory to specify the publicNetworkAccess, for example:

resource vault 'Microsoft.RecoveryServices/vaults@2023-04-01' = {
  name: vaultName
  location: location
  tags: tags
  sku: {
    name: 'RS0'
    tier: 'Standard'
  }
  properties: {
    publicNetworkAccess: 'Disabled' 
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resource-provider issue with resource schema for pulled resources triage
Projects
None yet
Development

No branches or pull requests

4 participants