From the course: Introduction to Azure Bicep: Creating and Deploying Resources
Deploying Bicep using the GUI - Azure Tutorial
From the course: Introduction to Azure Bicep: Creating and Deploying Resources
Deploying Bicep using the GUI
- In this video, we will start deploying Bicep code, the Azure resources into the cloud environment. There are many ways to accomplish this task. The Azure CLI Bicep extension or PowerShell could be used for this purpose. After watching this video, you will understand the basics of Azure Bicep and how to build foundational resources. Now, let's look at Azure resource hierarchy to better understand relationship between subscriptions, resource groups, and actual Azure Cloud resources. Traditionally, cloud resources organize under management groups, subscriptions, and then further into resource groups. You may think of a resource group as a logical container or a folder that holds the relevant resources of your project. You may get more guided information from Microsoft Learn documentation with the link provided below. Now we are going to jump back to the Visual Studio Code in order to deploy our Bicep code using the Visual Studio Code Bicep extension through GUI. And before doing that, let me open the Azure portal to show you where we are planning to deploy our resources. Here, I have couple of resource groups, so I'm going to pick one of them. Let's say I would like to purposefully choose this bicep-test-westus2, which follows some of the good naming conventions where we have some purpose, regional location, and what type of project it is. So here as you see, it's empty. If you used it before, if you logged in into Azure portal and created any resource here, it should be very familiar, you know, environment for you, so it's pretty empty. Now we are going to switch back here to the Visual Studio Code. And in Visual Studio Code here under the chapter two, we have this first video, and there's only one simple storage Bicep here, and nothing else. So what we are going to do is, first we want to make sure that this Bicep storage has a unique name. So I have this here: bicepintrostg0519. You may also change that to make it unique. And then we just want to deploy this storage, simple storage, account into our dedicated resource group. To do that, you would want to make sure first your Bicep extension's installed because that's the, you know, tool that you need to have to enable that. Once you make sure that it's there, I would say right-click and look at this popup. So here you should be able to deploy Bicep file. And this used to be an experimental feature, but now it is fully supported, so you just can deploy this single Bicep code using the GUI, so we'll click on that. It'll give us deployment name. This is the deployment name that will appear on Deployment pane of our resource group. So let's give it the name 250521, so it's going to be, let's say this is the chapter two deployment. So ch02, then let's say this is the deployment number 99, just to make sure that it's unique. Then we'll press enter. Again, it'll ask us to pick up the subscription. If you have more than one, you would have to choose the one that's appropriate for you. Then it will go and list all the resource groups. You can also type the name here. Our resource group was starting with bicep-test-westus2, this is the one, and then if you have any parameter files, you can add them. We are going to speak more about that in next videos. For now, we don't have any parameter. And that's it. Once we click on that, what will happen is you will see that in the output. It will say "Waiting for deployment to complete." While we are waiting for that, I'm going to switch back to the Azure portal. So we are back in Azure portal, and I'll just go back to Resource Groups and then refresh it. And then this bicep-test-westus2, that was the resource group we choose. So far, there's nothing here. Let's look at. Oh, here it goes. So we see that, you know, this resource already deployed. If you go to Deployments pane here, you would see that this is the one that we use, 0099, so it's the deployment name, and the actual resource have been deployed. It's successful. So if we switch back to our Visual Studio Code, now we see that deployment succeeded and here's the, you know, it returned back. So that's it. Congratulations, everyone. We deployed our Bicep code into Azure subscription. Next, we'll look how to do this using the command line.