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

[BUG] Symbolic expand for existing with conditional cases #2917

Open
BernieWhite opened this issue Jun 5, 2024 · 0 comments
Open

[BUG] Symbolic expand for existing with conditional cases #2917

BernieWhite opened this issue Jun 5, 2024 · 0 comments
Labels
bug Something isn't working feature: pre-flight-expansion Issues relating to expansion of ARM and Bicep.

Comments

@BernieWhite
Copy link
Collaborator

Existing rule

No response

Description of the issue

Better handling when references are not used.

For example, the existing reference could fail with index out of bounds but it should not be called when identityId is empty, but is because it is defined as a resource instead of a reference.

Error messages

No response

Reproduction

@sys.description('Reference a user-assigned managed identity.')
resource identity 'Microsoft.ManagedIdentity/userAssignedIdentities@2022-01-31-preview' existing = {
  scope: resourceGroup(split(identityId, '/')[4])
  name: split(identityId, '/')[8]
}

Version of PSRule

2.9.0

Version of PSRule for Azure

1.36.0

Additional context

No response

@BernieWhite BernieWhite added bug Something isn't working feature: pre-flight-expansion Issues relating to expansion of ARM and Bicep. labels Jun 5, 2024
@BernieWhite BernieWhite changed the title [BUG] Symbolic expand for existing [BUG] Symbolic expand for existing with conditional cases Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working feature: pre-flight-expansion Issues relating to expansion of ARM and Bicep.
Projects
None yet
Development

No branches or pull requests

1 participant