-
Notifications
You must be signed in to change notification settings - Fork 759
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
Create Extendable Bicep Params File Article #14865
Conversation
Test this change out locally with the following install scripts (Action run 10566240211) VSCode
Azure CLI
|
## What is it? | ||
Extendable Bicep Parameter Files is a feature that allows you to extend `.bicepparam` files from another `.bicepparam` file in order to reuse parameters across multiple deployments. | ||
|
||
When using extendable bicep parameter files, you will have a `base.bicepparam` file that can be used by multiple `.bicep` and `.bicepparam` files. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When using extendable bicep parameter files, you will have a `base.bicepparam` file that can be used by multiple `.bicep` and `.bicepparam` files. | |
When using extendable bicep parameter files, you will have a `bicepparam` file (for example, `base.bicepparam`, `common.bicepparam`, etc.) that can be used by multiple `.bicep` and `.bicepparam` files. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for writing this up! Have a few points of feedback that we should address before merging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great progress! Have a few new comments on the updates as well as some things I missed in the first pass.
|
||
* variables: we will not have variable support in the `root.bicepparam` file to be able to read and override values in other files | ||
```bicep | ||
var namePrefix = 'share' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a little odd to have such specific code samples for features that don't work. I think it's ok just to describe the limitation in words.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So Anthony had requested I add an explanation and example for each of these bullet points - I'll follow up with him to see if this is what he is looking for or if just a quick description is good enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anthony said the examples should be helpful for users - would you be okay if I kept them in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep - fine with me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few last comments. Apologies about all the back and forth. It is pretty much good to go.
|
||
`main.bicep` This is your main bicep file, which will define your parameters for deployment. | ||
|
||
```bicep | ||
param namePrefix string | ||
param location string | ||
param symbolicName string | ||
param tag string | ||
``` | ||
|
||
`root.bicepparam` This is your main bicepparam file, which can be reused by multiple extended .bicepparam files and in multiple deployments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I am the only one, but to me root.bicepparam
file is the one being extended, not leaf.bicepparam. So when we say "can be reused by multiple extended .bicepparam files", I get confused.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the way I see it is that the root connects to multiple leaves - so the root can be reused multiple times into several different leaf files, which I think is also how Engin views it - should we ask the team?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if I'm the only one with this perspective, it's fine to leave it as is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for getting this done! Looks great.
|
||
* variables: we will not have variable support in the `root.bicepparam` file to be able to read and override values in other files | ||
```bicep | ||
var namePrefix = 'share' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep - fine with me
|
||
`main.bicep` This is your main bicep file, which will define your parameters for deployment. | ||
|
||
```bicep | ||
param namePrefix string | ||
param location string | ||
param symbolicName string | ||
param tag string | ||
``` | ||
|
||
`root.bicepparam` This is your main bicepparam file, which can be reused by multiple extended .bicepparam files and in multiple deployments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if I'm the only one with this perspective, it's fine to leave it as is
Added an article on using extendable bicep param files, as well as limitations.
Updated the experimental features page to link to this article too.
Microsoft Reviewers: Open in CodeFlow