-
Notifications
You must be signed in to change notification settings - Fork 775
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
managementGroup() function doesn't seem to work for parent property #2535
Comments
This is a good find. Many of our scope functions don't really exist in the runtime (we have a plan to add them), so we currently compile them to an empty object when they are used outside of the |
@majastrz OK cool. So if I wanted to do something like the above, is there a way to do this today (in the nightly builds)? I'm trying to avoid having to embed the management group ID within the template, and would prefer to look it up dynamically - but if that's not possible then I'll work around it. |
I can't think of any way to do this. @bmoore-msft Do you know any way to get the current MG's name or fully qualified resource ID inside an MG-scoped deployment without explicitly passing it in? |
Not until 4451578 is merged... |
@johndowns, that's an internal work item to add the |
Related to #947 |
This will resolves a lot of scoping issues. Can't wait for 4451578 :D Will all these scenarios be supported as parent for a management group ?
|
Waiting on intermediate language change - check back on 8/31 |
Bicep version
Bicep CLI version 0.3.439 (fecce96)
Describe the bug
I've just been testing creating MGs in the nightly builds, and it didn't behave the way I expected. Here's my Bicep file:
When I deployed this, I used this CLI command:
I expected that the template would create the MG as a child MG of
MyParentMG
, but it created it directly under the tenant root MG. It's like theparent: managementGroup()
line was ignored.When I looked at the JSON emitted by Bicep, the
parent
property has been given the value[createObject()]
- which which definitely looks wrong to me.Should this work, or am I doing this the wrong way?
To Reproduce
Steps to reproduce the behavior:
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: