-
Notifications
You must be signed in to change notification settings - Fork 7
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
Existing syntax in language version 2 does not allow defining the same resource twice or more. #173
Comments
@dkershaw10 note that the issue exists only for Azure resources - in this case user assigned identity was defined as existing with two different syntax so it can be put as member and owner of a group. When I define Entra Application/Service principal the same way to put it as member and owner the issue is not present. |
@slavizh please close this if your testing checks out on Azure/bicep#13674 |
@dkershaw10 yeah. I am planning to test if everything I have logged is fixed and close items that are fixed. Have to wait for the the next bicep release as compiling builds on my own is not my thing. Will get back once I have tested it. |
@dkershaw10 Unfortunately the new Bicep CLI not only made the errors worse but also the working code around existing graph resources that I had also stopped working. Getting: "properties": { |
Created issue Azure/bicep#15513 |
Thanks @slavizh. This is disappointing. I've taken this problem up internally with both the BIcep and Graph engineering teams. |
@dkershaw10 after more testing seems the issues I have found are related to Graph resources referenced as existing. When not using Graph and extensibility there are improvements and no such issues. Another issue that I have found is Azure/bicep#15515 . But overall the ability to reference the same resource twice is partially fixed. It works if the same resource is referenced in two different existing syntaxes ( the case I was testing with Graph - the same user assigned identity assigned as member and owner to group) but it does not work if the resource is referenced twice or more within the same existing syntax. The latter is Azure Policy and other scenarios that I have not found needed for Graph for now. |
Issue is well known and defined here: Azure/bicep#13674
Graph requires defining extension microsoftGraph syntax which automatically makes the language version of the compiled ARM template to version 2 and you make it compile to language version 1. So in the case with Graph resources the only workaround to the issue is to use resoruceId() syntax instead of existing syntax.
Issue is opened due to conversation in #126
The text was updated successfully, but these errors were encountered: