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
support "naive" nested deployments #145
Comments
Attempted this and hit an issue with the
Here's the error: |
Yeah, properties only support identifier characters right now and
For situations like user-assigned identities, we would also need to allow string interpolation. (The IL allows expressions in property names.) |
Feels like it's ok to just allow it. TypeScript seems to allow it. You start the property name with |
JS allows $ and _ to start identifiers, which are common additions. UAX-31 has a table of optional start, medial, and continue identifier characters you can consider! |
@alex-frankel Fixed the quote in my comment. |
This looks good to me |
We're now using swagger-generated types, but looks like we're still missing these properties: I'll need to look into whether this is a problem with our swagger definitions or our type generator... |
I'm trying to create a nested deployment using 'inner' as expressionEvaluationOptions and sending params from my parent template to my nested template. Using the latest code in main, creating a nested template seems to work, but I cannot figure out a way to reference my inner parameters inside my nested template. This is what I got so far:
My problem is on these two lines:
Here I've tried using "native" ARM language, which is the closest I've gotten, but bicep then escapes the first '[' with an extra '[' resulting in an ARM template that looks like this:
I've also tried using a more bicep-like approach with something similar to:
Then I get the error Is there a way to write a string that gets directly passed on to the ARM template without being escaped? |
Not today. We intentionally are blocking this to expose specific cases where we need this :) We will have to take a look to see if we should revoke this. However, in this particular case, you can use the new Instructions on installing these "nightly" builds here: https://github.com/Azure/bicep/blob/main/docs/installing-nightly.md |
Thank you @alex-frankel! I will give modules a try tonight. |
Great! Here is the spec: https://github.com/Azure/bicep/blob/main/docs/spec/modules.md |
Works like a charm! Had to use reference() to avoid getting api-version and 'Full' since appsettings don't support GET methods.
Thank you @alex-frankel |
Awesome! Out of curiosity did you try:
|
That works! Thank you! I like bicep more an more for every day! |
maybe one day! glad everything is working well. |
@SimonWahlin - will you be able to share scenarios or use cases on what you would like to achieve if that is available? |
I'd be glad to, but maybe in a different forum? |
I think we can close this now that we have |
Since you are about to close this I'm taking the opportunity to highjack the Issue to reply to @gopinathch. We want to create and configure Azure DevOps Projects using ARM-templates (pref bicep) so that we can deliver a new project to a team including example-git repo containing a markdown wiki with welcome information, example code and pipelines to get them started and links to our central repository with templates, pipelines and such. The new project needs have pre-populated service connections to the teams dedicated landing zone subscriptions in Azure as well as service connections to services we use, for example SonarCloud. The project need to be populated with a few custom roles that has custom permissions and maps to centrally managed Azure AD Groups (where we can make use of Access Review and other security features). We want to keep all this configuration defined as code so we can prevent configuration drift and easily update projects base-configuration by changing the configuration and re-deploy, just like we do with infrastructure in Azure. This also opens the possibility for team members to request changes to their projects by a simple PR to the ARM template which would give us approval flow and traceability using the same tools and processes as we use for changing infrastructure. Most of this is doable using the new Terraform provider for Azure DevOps, but since we use bicep/arm for everything else, I've become a bit spoiled of the automagic and amazing state-machine that is ARM. Keeping my own state in a file that has to be kept up to date with reality feels less tempting for each day that goes by. Don't hesitate to reach out if you want more details, I think my email is public on my GitHub profile. |
Until we support templateSpec as a source for a module, we should treat this issue as HiPri as it is the only way to deploy a templateSpec |
We need to also check the behavior for the |
for 0.1, want to verify that we have at least a way to do this, even if it's not great
The text was updated successfully, but these errors were encountered: