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

What if validation shows ignore when referencing nested properties on module outputs #385

Closed
javierdelascasas opened this issue Dec 16, 2024 · 1 comment

Comments

@javierdelascasas
Copy link

Bicep version
0.32.4 (az bicep version)
Describe the bug
What if validation shows * (ignore) on resource when we use another module's output if the output tries to access a nested property.

To Reproduce
Create a Module A that have an output of a nested property (resource.properties.someProperty)
Call the module in main.bicep and use the output from the first module as a parameter in a second module.
The property needs to be used in a resource definition on the second module.
Run a What If on the bicep deployment.

Additional context
We have seem some unexpected behaviour running "what if" validations on our bicep modules.
As an example, we have a Module A which contains a resource definition for an user-assign-identity. Inside the module we have 2 outputs:

  • id = resource.id
  • principalId = resource.properties.principalId

We call this Module A on our main.bicep and try to insert the output as a parameter in another Module B.
While the direct property id works well and appear to be resolved for validation (the validation shows if the resource is unaffected or updating) the principalId output does not appear to resolve for validation and no matter how many changes the resource definition have, on validation the resource appear with a * = ignore flag.

We have seen this issue everytime we try to access an output from a nested property inside a resource properties.

@jeskew jeskew transferred this issue from Azure/bicep Dec 16, 2024
@jeskew
Copy link

jeskew commented Dec 16, 2024

There is a fix in private preview, but wider rollout is currently blocked due to holiday deployment freezes. Please see the linked issue for more details.

@jeskew jeskew closed this as completed Dec 16, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in Bicep Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

2 participants