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

Error BCP019: Expected a new line character at this location. #5468

Open
rurdea opened this issue Dec 17, 2021 · 2 comments
Open

Error BCP019: Expected a new line character at this location. #5468

rurdea opened this issue Dec 17, 2021 · 2 comments

Comments

@rurdea
Copy link

rurdea commented Dec 17, 2021

Bicep version
v0.4.1124

Describe the bug
Breaking change from the previous versions when passing values for array properties:

resource accessPolicy 'Microsoft.KeyVault/vaults/accessPolicies@2019-09-01' = {
  name: 'vault_example/add'
  properties: {
    accessPolicies: [{

Line "accessPolicies: [{" will throw "Error BCP019: Expected a new line character at this location." requesting a new line character between "[" and "{".

@ghost ghost added the Needs: Triage 🔍 label Dec 17, 2021
@alex-frankel
Copy link
Collaborator

Interesting - I see same issue in v0.4.1019 (what I happened to have installed).

This is working:

resource accessPolicy 'Microsoft.KeyVault/vaults/accessPolicies@2019-09-01' = {
  name: 'vault_example/add'
  properties: {
    accessPolicies: [{}
    ]
  }
}

but this is not

resource accessPolicy 'Microsoft.KeyVault/vaults/accessPolicies@2019-09-01' = {
  name: 'vault_example/add'
  properties: {
    accessPolicies: [{}]
  }
}

When I upgrade to 1124, I get the BCP019 error with the first code snippet:

image

@miqm
Copy link
Collaborator

miqm commented Jan 12, 2022

Related to #586

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants