From the course: Azure Infrastructure as Code with ARM, Bicep, Terraform, and Pulumi

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Solution: Adding storage with Bicep

Solution: Adding storage with Bicep

(upbeat music) - [Instructor] To create a shared hosting plan with three sites on it, we can take advantage of looping inside of Bicep. In order to do that, there's a few changes we have to make. In the first place, I need to take my site and break up the module that I'm using to not create the server farm and the website at the same time. So what I'm going to do is I'm going to take this, which is my resource plan, and I'm going to put that into a new file. I'm going to call this myPlan.bicep. And then for the plan, it's going to have a parameter that's going to come in, and that's going to be a parameter that's going to be called planName, that's going to be a string. And then using that, I'm going to return out the actual ID of that plan. So I'll type in output planId, is a string, and it's going to be the plan.id. I'll use that later on. In my site file, I actually need to tweak this a little bit as well, because now I'm not going to need the plan name and environment name. I'm…

Contents