-
Notifications
You must be signed in to change notification settings - Fork 756
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
integrate bicep CLI into az CLI and az powershell #858
Comments
Discussed with PowerShell and Az CLI team, and our plan will be to follow the AKS/kubectl model which does the following:
As part of this issue, we should aim to start #800 in parallel. |
Discussed with @rynowak, who brought up that it would be helpful to be able to point to a custom install location of bicep so that you can use private or pre-release builds of bicep if you want to opt in. Not sure how AKS implements it, but if it is just pointing to well known PATHs, then it should be straightforward for user's to replace the binary manually and not build anything additional. |
@alex-frankel - will bicep be included in cli docker image? |
Good question. I think if we do nothing, it'll have the default version of Az CLI installed, so you will be prompted to install bicep when a relevant deployment command is invoked. I will add a note to see if we can have this installed on the image so that step doesn't need to happen. |
@alex-frankel Would this also include support for validating deployments (az deployment group validate) or just the creation of deployments? |
It should include any cli command/cmdlet that uses the |
What is the progress with supporting deploying .bicep files using Az PowerShell and AZ CLI? What support can we expect as a first step? I looked at the code implemented so far and open PRs, and it seems that Azure CLI will support a lot more things thanks to @shenglol. Also created an issue in the azure-powershell repo with some findings on the code implemented so far, Azure/azure-powershell#14289. |
The initial scope of support is to install the bicep CLI if it is not present and to automatically transpile the bicep code if it is provided as the value for the Both Az CLI and Az PS support should be available in the next release that is set for the first week of March |
Both PS and CLI work for this has been merged and will be available on 3/2. There is a slight difference in functionality. In Az CLI, we will install a self-contained version of bicep for CLI to use the first time you use a command that requires bicep. In Az PS, you need to manage the install of bicep yourself and ensure it is available on the PATH. We are planning to add an @tfitzmac - I think it will be important to doc these discrepancies. Do you want me to update the installation instructions that are in this repo or will you plan to take care of this as part of the move to MS Docs? |
@alex-frankel - I think we should update in the Bicep repo. When the doc has been published, we can decide if we want to maintain both places. |
Just tested the Azure CLI code using the installer from the PR build. It works great! Only found one minor issue, Azure/azure-cli#17083. @alex-frankel I agree that it's very important to doc the difference between Azure CLI and Az PowerShell. And also write a note about the install path for the self-contained version installed by Azure CLI in |
The following commands should all work in Az CLI and Azure PowerShell respectively:
Compile and deploy a bicep file without emitting a
main.json
fileRun what-if and ask for confirmation before deploying:
Transpile a .bicep file to its equivalent .json file
Both command line tools should check if the bicep exe is installed on the machine. If it's not, the user should be prompted to do so in an easy way. Similar to how
kubectl
is handled today for AKS command-line scenarios.*** added 1/6 ***
Decompile an ARM Template into it's equivalent .bicep file
Needs to support source-mapping of some kind. Since end user's wont' be interfacing with template JSON anymore, we need to make sure that errors returned during a deployment are mapped to the relevant spot in the bicep file. It should degrade gracefully.
Described in more detail in #855
The text was updated successfully, but these errors were encountered: