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

Specifying scope by accessing a resource collection by hard-coded index produces invalid template #1791

Closed
majastrz opened this issue Mar 9, 2021 · 0 comments · Fixed by #1834
Assignees
Labels
bug Something isn't working
Milestone

Comments

@majastrz
Copy link
Member

majastrz commented Mar 9, 2021

Bicep version
Latest in main.

Describe the bug
Specifying scope by accessing a resource collection by hard-coded index produces invalid template. The produced template has copyIndex() without a corresponding copy loop.

To Reproduce
Steps to reproduce the behavior (from existing test):

// extension of a single resource in a collection
resource extendSingleResourceInCollection 'Microsoft.Authorization/locks@2016-09-01' = {
  name: 'one-resource-collection-item-lock'
  properties: {
    level: 'ReadOnly'
  }
  scope: storageAccounts[index % 2]
}

Additional context
Add any other context about the problem here.

@ghost ghost added the Needs: Triage 🔍 label Mar 9, 2021
@majastrz majastrz added bug Something isn't working and removed Needs: Triage 🔍 labels Mar 9, 2021
@majastrz majastrz self-assigned this Mar 9, 2021
@majastrz majastrz added this to the v0.4 milestone Mar 9, 2021
@ghost ghost locked as resolved and limited conversation to collaborators May 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant