Main

Learning Bicep by trying to deploy an Azure Function .NET (isolated) (stream 215)

In this stream, a .NET isolated Azure Function and slowly built an Bicep template to deploy it. The required resources were created in Azure and the in a sucessful deployment, but the code wasn't deploy yet.... ☁️Subscribe: https://c5m.ca/3c 📺 - Twitch archive - stream no.215 USEFUL LINKS: ----------------------- 📝 Stream Notes: c5m.ca/stream 🔗 🔗 Get Started with Azure with a Free Subscription: https://c5m.ca/azFree FOLLOW ME ON --------------- 🔗 Twitter: https://twitter.com/fboucheros 🔗 LinkedIn: https://www.linkedin.com/in/fboucheros 🔗 Facebook: https://www.facebook.com/frankysnotes 📺 YouTube: https://www.youtube.tv/fboucheros 📺 Twitch: https://www.twitch.tv/fboucheros BLOGS ------------ 🔗 Frankys Notes (EN): http://www.frankysnotes.com 🔗 Cloud en Francais (FR): http://www.cloudenfrancais.com GEARS ---------- - Davinci Resolve 16 - Fujifilm X-T4 - Blue Snowball - GitKraken: https://c5m.ca/gitkraken ☁️

Behind my Cloud

6 days ago

and of course of course  cannot log in to my account because cuz for some reason out cool so here I am excellent excellent hello  everybody quick sound check oh yeah it's going for you but I don't hear it I think it's I think it's good cool do we have CB nope we don't we should or maybe not in this screen no CB should be there we have the drop  game we have the drop game but we don't have CB if I spell it correctly it will be much  better ah there you are cool so we have this we have that hey Gr
im book hello hello  just getting started this morning I took a little bit too much time doing different  things and I'm late so just setting things up y so cbook uh qc888 Miss is it qc4 Quebec okay I have this so now I could move things here not sure what we'll be working on today not sure where is it this bing bang okay I have a few ideas but I'm  not sure should we work on okay so I have this I have that I'm assuming you  can hear me otherwise you would have like hey no sound no sound can you
hear the  music you hear any music should be very low yes card ban welcome first  time in the chat welcome aboard so I don't know what we'll be  working on today so I think uh maybe we could yeah you know what let's play the intro and  we'll get [Music] started hi welcome aboard I'm Frank bu and for the next two hours is  we'll have some fun playing on coding net stuff Cloud stuff gaming stuff deployment  CDI question it's a place to learn it's a place to have fun so uh don't hesitate if you  h
ave any questions while I'm doing something ask and um will help you uh if you are not  good enough to write in English you speak French I speak French too so I will translate  the question and answer it in English though because I want this content to be in English  but feel free to ask your question in French if you're a little bit more comfortable over  there uh I mean over there in that language uh I will be happy to translate your question and  and answer it so the plan of today is I don't
know let's start well yeah let's do something  um I'm I'm balancing between different things so let me put it this way oh I should Swap  come on Mouse so last stream we were working on the URL shortener so like URL shortener  I've been working on let me put that in the chat and I should start the Stream So CB keep  disc scores uh we'll call that learn for now uh and I I will have to update the dream  definition so URL shortener uh it's a URL it's basically just it's create short URL  I create th
at on the stream long long time ago uh it got moved under Microsoft account  uh they they needed to do some stuff with a uh Azure communication services and uh specific  client um and like they they change a few things because the purpose their their their usage was  to create tons of disposable Ur uh yeah URL to send in a m a text message text message SMS uh  but the way I use it and multiple people who build that tool is more as like I'm building  one URL and I want it to be used as much as I
as we can for example I'm doing a YouTube video  I'm doing a blog post and I want to share it on social and then like I will be able to know how  many people click and like you know things like that like if I write a blog post like when like  you have some a little bit of analytics in it like I think I have a page here so that's what it  looks like see we have like a few analytic nothing crazy just like when people click and stuff like  that so it's very useful when you're a content creator so w
hen Microsoft took the project they  removed some stuff it makes sense they they make it great uh but I I was like ah I would like to  change like I don't want to lose how it's built so I started the pr so a pull request sorry oh  I canot go here it's true let's switch account I create a pull request here then if you're why Frank cannot go  there it's because uh my other profile the the profile I'm using most of the time the  fbet um when I go on Microsoft property I have a lot of permission so
I'm forc to be on my  Microsoft machine I work at Microsoft if you didn't know so I'm not on my M that's I don't  like that sound anyway um so yeah so I'm like I'm not on I'm on Linux today so definitely not  the Microsoft machine um so yeah so that's why I I created a new account just so I could go  there with less perm Mission but it's good enough to show and to PRS and stuff like that  so I upgraded the version so now it's net 8 it's working when I deploy it manually it's  totally working and
and we have two tools we have the admin what is I use two different  instance of a browser to keep my account separate when I was in this sit I used to do  that but now in um in GitHub you can switch account you could have multiple account if you  want directly uh so uh I think sorry like that sound I don't like it I was loud on my side who was that Stefan is  here hey buddy how are you nice to see you uh so yeah uh m i I used to in fact I use a lot of  different profile for different tools but
since they did that uh I thought was pretty nice uh like  you could just switch account and it works uh and and even if I have a different profile it wouldn't  work because I really need to be on my Microsoft device to be able to go on some site for secrety  purposes um because I have admin permission and stuff like that when I'm just like a regular  user so that's why like if I go here that's a my you don't see it here that's my like regular  user then I can I can go on that repo without any t
rouble and go like PR and everything because it's  not Microsoft web like repo when it's a Microsoft repo I I cannot go there as me because I have too  much uh permissions anyway back to this uh doing quickly a recap so we built that tool it's two  tools facts there's the URL shortener and there's like the admin tool so one is a static web app the  other one is an Azure function and we kept them separate uh for security purposes uh the your the  r is just a r cannot do anything else except look
into the database and just like throw the short  like the longer version of the URL and make a rhic so people are redirect and the admin is also  having an Azure function but embedded inside the web app with all the management capability so  create delete archive updates like the URL and stuff like that on the last stream we were trying  to deploy I think that's what we try to do and we were having a lot of trouble with different  component and stuff um and I work on that offline because I was l
ike yeah no I don't I don't  like why it's not working and try to figure what was working what was not working I thought maybe  it was the the tool like it's been a while since we worked on that so maybe it's not compatible  because you know stuff and the cloud continue to improve so I was maybe it's not up to date so  after the stream I continue uh and um I upgrade the version to net 8 because it was that net seven  I think so I was like you know let's push it to net 8 I I don't use any feature
of net 8 I think  but just like so at least we have the LTS version of net in it and deploying works the way that  the tool works right now to deploy is to deploy the uh static web app you go in the Azure portal  you say hey I want a new Azure new static web app you specify the repo and you have the website  but just the website so like you still have need storage and stuff like that if you create  manually the storage and then apply the like change a configure so like if you deploy the stuff 
manually it works the Azure function the only way I was able to deploy it successfully was doing  a from vs code you like if you have the um Azure function um extension you could like deploy from  there so it's a zip deploy that worked too I did try deploying with a a template I did try to do  it like Azure function and then you create uh cicd from there didn't work so I'm not sure if and and  there's like a few things that I'm not sure so I was trying to do it in Linux and I think right now  th
ere's a bug if you're in Linux like I was like like there's a very Niche situation where it was  not working and like part that Azure function was in Linux was part of it but it's not the reason  like there's plenty of azure function on Linux that works but there was like bunch of condition  and I think we were perfectly in that spot so so oh okay let's fall back again to Windows because  I think since the beginning it was in Windows anyway but I was like oh Azure function also  change a few thi
ngs I was like oh is my code not compatible but no because I did successfully  deploy it so was it my arm template do I need to do something else so I play a lot with the arm  template couldn't make it work so one thing we could do today is try using a so the Azure  developer CLI I've been playing with that a little bit so we could be working on that  and try to make uh ACD up and deploy so we could just create like a simple Azure function  try to do deploy it with the ACD up if it work try agai
n but with the Azure function that we  have if it work maybe add a static web app in the mix uh and and you know try to complexify  as we go so we could be doing that that could be cool kind of like understanding the a  uh stuff um and and at the same time try to learn because I start playing also with that  with biceps biceps it's infrastructure as code it helps to Define your resources and where  is the code and deploys it um so we could be working on that could be interesting uh though  it wi
ll be a lot of like search and learn and stuff um I think I think I want to play on that  because I feel like I really should work on that the other thing is um I was showing it just  few seconds ago so that's another project I have the tiny admin missing uh so no tiny and  Min now is part of uh of the tool so if we go back into the code so right now snab um if you go  like I would say right now the best branch is the uh is this one pretty sure it's that [Music] one let's go again the pull reque
sts just in an open time I think I create  the branch so 506 and this is 505 what's that wrench yeah 505 so 50 five  is the best branch or like you could go and go for like for my core extra so that's the  branch it works if if you want to had the um the tool you could totally do that and it  will work uh going picking the 505 branch and then like in the The Source folder I'm hiding  my my stuff in the source folder fer you have the tiny Blazer now move so they they move  everything in in the sa
me so I think that could also be the problem or I'm not sure how  to man like I can fix it in my in my repo but my goal was always to make the URL shortener as  easy as possible to use and right now my problem is like I don't want like 20 steps to deploy  that and like being super comp like complex I want something simple I would like my mother  to be able to do it my mother is smart but she's not used to play in the cloud and things like  that so I want it very simple to deploy and right now it
's not so that's what I'm trying  to fix to make it easy I want to like I wish I could go back to the oneclick deploy stuff  uh and I think with a um ACD works when you clone locally or maybe it works also from  uh what's call again CL uh code space code space but with a a like in biceps you could  generate an arm template so I'm thinking if I do that then people could clone locally  and and change stuff and do the ASD up or because I have all that bicep stuff I  could generate the arm template
and the arm template will be complete complete  complete so I will be able to do the one click and it will deploy everything  that's where my thoughts are like I feel like things change in the cloud and I feel  like I'm probably missing something when I'm deploying the the the tiny Blazer admin it  works then when I deploy the function function I I cannot deploy the function and it works so  like there's something wrong when I'm deploying the function it's not working anymore and I'm  not sure w
hy but then it also break something in this like I lose the uh function so is it  because I have two function in the same repo that it's not working and it's conflicting  between the two uh like the the GitHub uh get up actions I'm I'm I'm like I'm not sure  why but when I deploy the Azure function it breaks the Azure function inside the static web  app I don't know if you you you I'm everybody's following anyway I feel like we should work on  that we've been talking about it like for the past 2
0 minutes I think we'll we'll be working  on that um uh 2d6 uh is a a game that I start it's a paper game it's a paper game let's go back  here the paper game oh I could even go bigger vo in the cloud uh and Todd um I chat with Todd so  Todd is the tubby tubby sorry Todd tubby is the creator of that game he working right now on a  different version so it's a dice and paper game and I start making like a companion app of that  just messing around um this week I was uh having fun with Aspire Spire
is a thing for cloud native  and I was ah maybe I could migrate this instead of having bunch of Darker container and things it  could be a little bit easier though it make it a little bit more portable because Aspire right  now is still like not a general availability so we're still in like preview mode so it change a  lot so I maybe I should stay out for a while um but I did not work on that for a while now like  three months without working on on two months pH two months it's still a lot two
months since  I work on that on that thing um I wish I want I think I want to work that and like it was H the  fight uh like right now the way I'm working on this project is I kind of do all the art are  not necessarily in term of code but like how do I design that like what will be the piece what  different challenges so try to fix all those and when I have all those then I will kind of like  put everything together so maybe and since it's two months maybe it's better that I keep that for  anot
her stream yeah I think I will do that I will keep 2d6 dungeon for maybe next stream we could do  that I'll try to do it maybe during the weekend or the I just kind of refresh my mind uh so like we  don't spend a lot of time like looking around oh what's like what's the status of this what was  working what was not working so I think I think we'll work on the ACD stuff today yeah let's  change that so let's change the status of the um the spining and the pr update the  spelling in PR update what
do you mean um okay what do we do um a yayer yay CI voila cool let's do this bang mouse back uh so what was  it thank you R you answer my question oh did I land I landed cool okay sir let's go here in my repository yeah I was having  fun with like uh Aspire and and things uh so but yeah let's work on the URL shortener in DRL shortener we are in core extra that's where we are I can I can put  that in the chat if you are interested to follow or try it on your side uh and then  if we go this and t
ry boom let's bring some what another update okay so do I have a here a yes Azure developer C Is An Open Source tool that  helps onboarding oh I should show you what nah why enough talking that's like I work on  stuff and I'm planning to record probably a video today about um AI sample with net  and it's you could do that also using a and there's a new template I created so uh if I  oh maybe I did try it here so if I do Dev get um what others yeah AI simple is here okay let's uh remove uh is it
R forgot yes oh that's not convenient let's do it this way I want to show you because I think it  was cool uh get by set Butters this and delete boom so here let's cut this  let's clear so now what you could do is make a directory I think I did it yeah so you do a directory like this  so now you go in that directory ah I'm not used to that cool and and uh then you  could do a in it exactly and you specify so the dash T you could do also Dash Dash  and then template if you want and this is a temp
late and you could just do this like  that and say hey do you want to initialize say yeah and just like this you give it  a a name so let's go say my environment is learn now I download everything so  now if I do list I see that I have all my my stuff and I could open it if  I want if I go let's say code Dot and open code why I'm not using my mouse  so here I have I have the the repo there right so with all the simples let's go  in the corner Frank all the simples are there AI simple for net and
you  could just like hey get started with centic kernel get started with  Azure open AIS DK and it just work and uh like there's more coming up and  things like that so there's plenty of sample and I say hey okay I want to I  want to do like a this one you just go there and explain what you need to do um  so okay so first deploying the resource great so to do it you just need to do  ASD up that's it you do ACD up and it will deploy the Azure uh resource you need  and then you just do net run an
d it will it will automatically run uh there there's  other SLE coming up oh that's cool they they try oh no okay they get started so yeah you  could try this uh so yeah so that's the thing and they will uh have more templates so when  you do the ASD I think you could do template list yeah and template list they will list all  the templates available unfortunately for now now uh so I think it's next week um right now  the template works but it's not displaying in that list and if you go also on
the website uh  it's not there yet so next week so that's why I'm saying like probably this afternoon I will  be recording something uh hey gameer how are you so [Music] CD uh this slash Dev slash get um Rose yeah I know I need to understand better how that thing works cool so I think I  think what we want to do is [Music] uh I think for to get started we'll  create a very simple Azure function like a brand new one and we'll  try to deploy that using ezd yeah and then yeah so what oh I'm in the
Y shortener  no no no so I want to go back to I want to go here and um make a directory let's call it how do we call her project learning ezd learn azd great so now let's open that into code we  could try to do punk in it from here yeah I think it will ask us sponge cool so punking  it is the function core tool that helps you to do that uh so I want to go so in the URL  shortener we're using isolated process the idea behind it is like we don't wait for the  platform to support or not support the
stuff we're working in a on our own core so we'll do it  a two uh it will be C SHP isolated not fshp so one here cool so now I have the uh function app  function app is crazy so like the container but I I don't have any function forgot oh it's  called though is it add new if I do Funk Das dashel it's new create a  new function template alas okay okay so let's do that funk new oh EXA excellent that's what I want  we want a HTTP trigger and the name will be uh C5 5m test yeah why not so it look l
ike I  did try to do that already I wonder where it was but nevertheless let's do it again okay  so now we have plenty of stuff I just do a list we can see here I have a bunch of  stuff um so now let's open it into code so we could customize it a little bit just  a little bit and I just want to close a few windows that are open on my side that we don't  need like we don't need this we don't need the other so that's the good one that we don't need okay still I have 2vs code NE them what newm why
newm is there I'll have to look okay so our  new project learn ACD is an Azure function so I guess right now oh I  forgot can I do play let's reopen it it should says hey yeah detect the Azure  function so that will be cool because then it will create the resources we need in the vs code folder  so we could just like run it locally so let's do a yes and I was hiding it Frank go in the corner I need some Hood when I start the  stream because I move everything around I warm up and after that I coo
l down so  now I need need back my hoodie okay so finishing initializing finished initi so let's  let's play that let's do a drop at the same time did it start I don't feel it  start come on play Oh fail web storage it whoa oh there's a butt now that Surly put  Surly not surely but Surly put that told me eight 48 that's cool uh yeah debug  anyway we don't use storage and that demo Okay cool so we have this let's  control click did they open control click voila it open here welcome to Azure  func
tion okay so let's customize it and now let's break it after Okay so let's  stop this boom one thing we could do if we go back in the code is in the  oost nothing in the host in local settings forgot what I was I thought it was host oh so yeah so there's here use uh deployment  storage we want to put false we're we're not using it so I will stop having that hair  at the beginning cool and now let's change so we have here our trigger and I would  like to put it in a folder just because I have tha
t structure I don't think it  makes a difference but just case and do I want to move everything in a folder  called Source maybe I should I want to let's let's do it like this first well  what yeah I want to put here functions and move my functions in it voila we should  initialize here initialize the repo excellent before we Break Stuff feel like it's a good comment uh okay so we have that let's change so we have logger  that's great let's change welcome let's bonjour you know so we know not it
's  not a fake cool so we have that so now now it should still all work  so just you know be sure sure sure sure sure uh function out function come on I did a five it should work and we  shouldn't have that popup say you're not using storage perfect  so cool let's oh no I did always do that I did control C on the terminal so  of course it handed the process and do control shift C voila and now I can go in  the open browser and enter this and say and if I do this is there name equal Frank  no one
there was no apparent through Okay cool so it's working excellent excellent so now I thought yeah there's no parameter is there just but it's it's good we we have an  a function so now we want to initialize the E so to do that we need the terminal and ACD  again now I'm hiding it so I we go back in my right corner voila I open the terminal I could  have done it from the terminal here but like I prefer like staying and I I'm not used yet to  this is warp is anybody using warp it's a new uh termi
nal but new it's new on Linux but it's  been a while on Mac but I'm not the Mac User but like it's used this thing I need to get  used to looks pretty you have different tab you have panels without the terminal the app  is better done than the the default one like that's the default terminal but uh I still need  to uh get used to it so for for now we'll just do this so we stay in vs code so a I still  having it here voila um and there's in it so this will initialize a new application it should 
create a few folder oh you know what let's push this so we could see at every step what's new  what was created so we'll just push this say um we just change the the sentence right yeah now it's ours cool so now we know okay so let's  click in the terminal do it clear now we just want to do azd in it so now it's asking because it's  kind of smart right so you could go in a template or you you could trust that ACD will look at your  folder and hey Mr bald beer Builder how are you I improve my Eng
lish I can't say your name now but I  need to read it and like really be careful how are you we're trying to learn  ezd I'm trying to fix my URL shortener and uh I feel the problem is azure  evolve all the time you know and we didn't play a lot with the URL shortener and the arm template  now is it's deploying it doesn't create any error but the Azure function is not there like it says  successfully I see the code but there's something missing so I hope that creating a new template or  using a w
ill fix the problem like if problem there is morning coffee yeah it's true your mountain  or Central time zone right so it's a bit earlier for you that cool okay so I want to use the I  I don't want to use template because template a lot of the time they say it's a measure function  with a database and blah blah a bunch of different stuff and right now we want to keep it simple as  simple as possible we created just created like a new Azure function that does nothing except say  bonjour so now w
e want to deploy that so I can I will say use the code so now it's scanning say  hey it's in net great you should know easd I'm only doing stuff in D net though may change  in the close future confirm and continue the initialization yeah uh environment name we could  call it learn I like that environment like it's not it's not even Dev but uh let's let's be a  little bit more classic here and go Dev so it what generated a bunch of stuff so generating  Azure yaml so we'll have a look into that ne
xt step so I really enjoy that they are doing that  it's a little bit small maybe yeah they create a markdown file to tell you like hey this is the  next step you should be doing that's I really enjoy and then they created the infrastructure  remember the infr infrastructure as code so it's using biceps that's the new version improved  version of it's not the new version it's a better way to generate arm template more code so in the  folder infra definitely we'll have a look into this so now it'
s ready for the cloud oh yeah so  we just need to do a up should we try it why not I never looked this up but you probably  know I'm always using arm template to deploy yeah you can use terraform  too um I mean I've been I've been um busy I've been kept in a bunker Secret  working on stuff uh and like helping others to create content so I didn't deploy a lot  of stuff and I didn't then learn or uh um keep up with biceps and ter form um so like  I I learn it kind of like I I start missing around
with biceps two weeks ago uh when  I was uh creating some documentation for um net and AI but um yeah it's pretty  cool so let's have a look to what was generated oh that's that's cool they let's close  the terminal so they say we could do azd up now so I I feel like uh I might try it it probably  fail but I may try it okay so it had oh okay so yeah it's true so it updated my G ignore adding  the folder net aure well have a not net but aure or have a look into this um and the Azure yaml  that's
uh if you're deploying that that will be in your GitHub action or like the your cic  CD and it just helps to do that that's cool ah okay so look like I could be using azd as  a GI up action or Azure devops deployment I don't need to generate the arm template I'm  curious to generate the arm template and see what I'm missing I did so much arm template feel  like that's what I Le I I know but uh in in the back by cep generates arm template not in the  back it's like it's like they clearly explaine
d uh Next Step let's look uh at we'll look at  the better abbreviation okay so let's go in the file so let's look at what was created  so they created that folder Azure and in it it's Dev so and config so this is your local  environment Secret information and that's why it shouldn't be pushed into the cloud and that's  why GitHub ignore was haded because this should stay there and you could have as many different  environment as you want so right now if I go in config I will just say hey it's ve
rsion one  default environment is Dev if I had multiple I could Define one that is a default if I go  in my Dev environment I should just like have environment with like hazure environment name  is dev then I have a specific configuration so if I have different names and stuff like that it  will put the value over there so really really helpful can we restart the stream redeem inqua let's restart boom no no no no  welcome s Dev how are you so you uh you redeem something in K obviously ly  it's o
nly you does that so what do you want me to say again if you didn't know  you can spin your point and make me talk in like a French Kad do you say is slang I  guess J is not a word in English right so it will be slang but it's not slang please  say we can restart the stream now sure is here I said yeah mean um finally kind of good enough you're happy Mister uh so this  is our function didn't change so infra this is our infra infrastructure as code and we look  at the yaml before we go into the i
nfra I just want to look the next steps here and we'll look  at the preder version please voila so next step oh there's even a table of content that's  so nice uh Define the environment variable modify your environment cool uhhuh the main par  parameter okay so like we have those two file here uhuh for reddis we don't have any  reddis uh Provident infrastructure is the up or we could do it in in like  provision and deploy and configure for configuring wait create a  workflow pipeline locally oh
there it is there's the clip where I look brilliant Yips I should put you will hear  it oh I think you should hear it now but I won't watch live thank you sir okay I will listen to it later is kqu mostly strong  accent or there's learn word from English uh well like there's diff there's a there's  an accent but there's different words to do stuff the same words or let's say for kids for  me kids will be uh M like kids but if someone from France say the word kids they could say afan  but they als
o be using MOS but for me meus mean my balls but be because I will be speaking  with someone from France I will make the auto transation but the first time you hear that  you're like what because some people like hey do you want to see the picture of my kids like you  here do you want to see the picture of my balls and it's like what no but then you understand  but yeah so there's different words like it's the same words but used differently uh and  there's expression of course but that even tha
t just like in other country expression  will change depending on an accent will be different where you you are based um the  first time I met my father-in-law I had a really hard time understanding him not like  in the basic conversation but as someone was like what what are you saying like I didn't  catch what this this sentence mean uh yeah so yeah we can hear okay cool okay so  run easy to configure the deployment pipeline oh that's interesting  so I have to try that looks like it will creat
e an environment  though we don't have a remote um okay so I okay now before we go and do  the ACD up let's look at what was created for us so just like in an arm template you  have kind of main biceps oh yeah I want to install the uh bicep and extension obviously I  thought I had it maybe it's on my other machine cool so I have main biceps and the beauty of  bicep it simplify a lot the mod modularity of your scen script instead of having like  a big one and um you could do like section and do d
ifferent arm template and used  it like nested arm template but it was kind of complex here they make it much  simpler so just like before you have your main biceps that will take parameters see  here I have environment name location um I don't know what are those learn ACD exist  learn definition principal ID ah I think that's the the thing I'm missing tags so like you have  different parameters so here the parameter files you could define specific value and that will  also be save if I believe
correctly in your environment uh because when you do ASD up it  will ask you for all of those so you know what I think I think we could try it and after that  maybe while it's deploying we could try to dig into the uh the other um folder oh and and  one file I because that I feel it's really smart I did so many presentation and blog posts  and stuff to explain how to manage the names and things like that one thing that is pretty  cool here they have that file here AB abbrevi abbreviations that
Json and they will load it so  where is it if I go again in my sorry in my main uh it's probably one of the first thing they  do so here they load so you could just load the file so load J Json content this and they  call it abbd ABB RS and now what you could do is let's say you create a name oh that's bad  here instead of using this they could go and say I guess it should be like this  uh curly brackets and then you say a BB r s dot yeah and now you  could specify Resource Group and if you go i
n that file  and look for abbreviation no here it will be so instead of having hardcoded prefix here  you could just because you know before it was it was card it was like this so now you could  just do this and in fact remove this so now like that you're following the best practices uh  so you could be doing that so you know we just change it so that's pretty cool so now we when  you're naming stuff uh you could just change it and also that after that you create bunch of  module so right now mo
dule is monitoring uh so like you go and go in the monitoring so like  they put bunch of Chunk uh the resource Group here that's it oh no okay so dashboard that's  also cool they create a dashboard um not sure whatever registry key Vault are using a key volt  why I don't have key volt uh environment biceps so maybe I should have I should  have used a different see here they're using it so abbreviation for  app container uh container app an Azure function so now if I go yeah it will be if I  chec
k here it will be AC and I won't oops NOP contrl f contrl c yeah H I want a function maybe  I did not use website function yeah I want it to that fetch container yeah I know  don't fetch container oh so maybe uh it didn't do what I was expecting uh  I don't I don't want to deploy that in a container because it's not a container it's  Azure function but no I want I want it in a function was it because it was in a folder interesting okay um let's close this let's reopen  the folder uh let's clean
that up let's try again uh we were in  giab n f busher Ros here I want to remove I want to I please show me The  Hidden F folder I want to remove this this this I think that's it right I want to remove the infra infra folder the Azure folder the Azure  yaml oh and the next step yeah so I want to remove this one thing I could do  let's say if I move function back to the original spot if I put it here will  it see that it's an Azure function and now let's reopen it code okay uhuh uh so now we're b
ack what's get ignore  well that's good yeah we move that far that's good so if I clean uh let's azd because  I feel azd if I do azd uh template list template list there's a there's a  lot of things yay who lended Marcus hey what's what's biceps it's this  my friend uh biceps it's uh infrastructure infrastructure as code language uh a little  bit like terraform uh or arm template it Define your structure your infrastructure in  the cloud and then you can deploy it using that uh so that's what uh
bicep  great question by the way thank you for asking uh and there's plenty of  simple but it's always multiple Stu stuff so if I go online if I do azd templates I want to see the templates  available templates no I want to see I think that's the website what oh is it there's a website for the template and if I go there yeah I'm not sure why it's not working that's not what I was working come  on there's a website so it come froms this oh it's broken oh maybe it is see the template they have bu
nch of  other stuff but I just just want an Azure function and on the broken website and see here is that the temp the  template the sample I was talking to you um yeah but this is broken so usually here you you have like a sort you could search  and stuff like that but now it's broken uh measure function templates but that's I think yeah that's the Azure function  itself not the CLI not the uh not the bicep yeah if I say bicep maybe should put a s otherwise I will try to create it from scratch
want to see the code please that's exactly what I want though  so let's do a DOT so we have the vs code online so Marcus you land on top of that uh scores who's leading today hey I did 40 something that's weird it didn't kept my new score that's not fair oh no quick start whoa stefa was kind of like 53 it's good  good score yay now like all those digital friends I did also right 39 so I wonder if it will  keep it so I think if I I had a function to see I do is it stats see it remembers only  six
six I don't know why I did the start though I don't know did I I didn't anyway let's do not um okay  so here I'm looking for the I should have check where I was guessing we have what was the folder so we are in the quick start Microsoft  web function app create Dynamic quick start Microsoft web Microsoft  web then we have app function app and it was function app create Dynamic that's the arm template that's the bicep using node we'll have to  change a few stuff I wish we could let's give it ano
ther chance if I do a in it yeah see Azure container apps it  was telling me I said no no no no no no so select the service you want to remove uh all of it up and down I just have that net in do yeah initialize my app no no no no no no no  no no no no no did it create anything no I this shouldn't make a difference so let's  move it here well I wanted this there let's ah okay let's there's a template where it's  kind of empty so we whoops so clear here so what I want to do and I will put the F ju
st a  bit smaller so like the the output is better I will use a template but the template will be  like the basic one so and then we'll be able so we'll create the the folder structure I think  and we'll be able to put what we need uh so I will do azd and then in it and then instead  of using the code I will go one down select template uh initi I app using May override yeah okay so now have minimal then let's go quickly through  it just in case uh static web app blah blah blah biceps template bo
ost strap Azure  deployment environment not sure what that one is starter biceps maybe that's the one I want  [Music] um I will definitely create one after so net kind of a net Azure function template uh  Azure function text summarization AI C isolated Azure function oh I could be using that so  Azure function text summarization using AI so it will be C isolated that's  what we want it will create the cognitive Services where we could  remove that but I'm guessing it will also have a bunch of st
uff kind  of a key Vault and things like that because uh to make the connection between  those two so I want to keep it simple uh aure function so I it's always like  multiple ones I want like a very simple I feel like um that's what we  should be working on uh net function app with service BS see that could be cool but  it's not isolated I really want isolated so I feel like we will do the minimal [Music] bicep yeah so we'll go what was it starter bicep Dev container why did you  create a Dev c
ontainer for me there's a lot of stuff here  okay so for us what we want now was to look in the infra ACD do what's that they n you know what I I don't want I don't want you delete uh death container  I don't want death container for now uh I don't want work flow for now uh this that's that's okay uhuh why did you miss oh no that was  me I put the false right 100 what what oh did he override my uh did he override my why I have 128 oh it change all my uh yeah no no no let's revert this back yeah
this card  changes no kidding yeah now it's 51 much better and we'll go again and change it where is it get ignore VOA now let's  go to the end and add the folder so 49 it's still a lot to  file read me no I don't I don't want that okay so I create maybe it was minimal  was the one I wanted I don't I don't want this move to trash this it's a lot of stuff  we'll keep it for now we have abbreviation core put all of those what are those AI conf it's a lot of stuff maybe minimal was better okay I fe
el like I don't want that  abbreviation I want main I want main parameter I want we'll we'll change it from the template  we we had right so I think now we could go here and we'll delete all the content of that so now if we go in our browser main  biceps and the function app create Dynamic though was it isolated deploy the biceps file I want to use this maybe here I should have said isolated yeah okay so we'll need to have a  star account that makes sense the code need to sit somewhere up inside
  to monitoring and function up okay cool there it is so we could try to to do kind of like that copy paste copy  paste copy paste oh or just go here that's Linux okay I mean I don't mind if it's running on Linux so Azure sample function app arm template so function app arm template  so Azure simple was it where we were yeah and then say I want to brow the code ah here it's quick start interesting okay so like there's a so what's that that's we  know unfortunately that's site is down so that's e
xactly the same that  we have here so let's open that one so that could be cool but I'm curious to see other samples so let's go here  Azure samples oh there's tons of stuff obviously maybe I went up too high okay so in Azure function if I'm app arm template  what else do you have ah interesting let's go a little bit bigger for you so we have uh  dedicated plan no deployment slot Linux consumption premium private your meeting maritan start  good luck on Friday meeting maritan that's not fair any
way see you  next time have a nice weekend sir the zip deploy a zip deploy workflow oh that could  be also since that's the only way I make it work that could be interesting but then  where where is I'm curious to see where is the oh so that's using an arm template but that didn't work on my side though yeah package you so you need the zip  file package somewhere I could be doing that though I could be using that too that's  an option okay so let's play with that one uh let's go oh yeah I'm I am
in vs so  let's go like this and paste it here but I will be missing all the module though let's yeah and we  don't have we don't have the the parameter matching oh maybe I don't need anything  else okay uhhuh I go here and now parameter parameter what are the parameters we have here we have app name oh here we need  an app name we have environment name we did it location we'll have to use location that's for sure I'm pretty sure we have one  here yep okay cool so we have app name okay if I do
this do  you have any suggestion for me do I need to reupload reopen the the the thing I mean okay let's let's just do this this way not sure how it works I thought app name second parameter was storage account type though I'm good with this one  I look location appst string location runtime yeah it won't be isolated yeah because to do it isolated  you have you need to um it's net D isolated maybe I can add that  instead of java let's put net Dash EOL doesn't specify the version Neer that's grea
t so that's what we want I think that's the part I was missing in the  past I didn't have identity uh and I think I will have to put so that's good for that's what  we want we don't want the node version so if we let's open another vs code and we'll look  we'll cheat a little bit we'll go at open recent um the this one oh no that's not  what I wanted open recent uh URL shortener and no no no no I don't want I just want  to see the code no no no no no hey do you want to do that do you want to do
that I detect this I no  no no we no we just want to check the deployment stuff here well that's huge uh so that's an  arm template so see when you deploy and I'm uh you should have so here that was the version  I should uh let's sync with the last version uh so this is good so see like the function worker  run time should be this so here if I switch in my other and search for this yeah so  in fact I I I don't want to have the choice I don't I don't want that parameter let's remove it cool so he
re what I want is net isolated isolateed great  so now let's go up again where it was pink triple triple click triple  click okay so this so that's great and and I'm guessing instead of  like the this will have the net version I think this is what  we want and it's not in the uh app settings I'm not sure maybe we don't need that oh maybe that's was was missing oh because I have it here and that's in the config of the resource function app and  in the other one I'm in the plan right yeah I'm in t
he plan so you know what I I definitely don't want notes the  node stuff I don't I don't want that uh okay so we have this we can try to deploy it and I want this like I would prefer  not having the choice I think it's just confusing so I would like like to  change this so let's put this in my clipboard let's try to find where this is available cool so I want to this  instead be this go up and all this parameter I don't want you great  feel like I need space in there okay cool okay so let's let'
s give it a try uh probably  fail I'm not sure it will be isolated I feel like right n maybe we see isolated we'll see so let's  go here let's clear this who no no no no contrl Z okay here voila up a little bit now if  I do oh I could try to do a or is there a deploy validate ACD validate  or something ACD let's do ASD help um so I have UT config hook  in it restore template deploy down environment package provision we could try to provision oh you know what now let's  go pull in ASD up ACD up t
his will provision and try to deploy right why  not probably fail oh you need to log in okay you can close stop yelling at me well Frank you at Zoom 500 500 that's  that's that's a lot of big okay come back here clear easy up okay the sky got dark I should have like a winter  version of that it's still working okay so let's do this sun black CL White Cloud and sunny uh I  think I want to go which subscription I want to go uh I don't know how can I check that in security  let's open here in the s
creen you don't see portal to.com what is my subscription oh and it's  white because I was recording I want to go in yeah this subscription right yes this subscription is  called show me it's called what Frank pev so I want to go in Frank persev and I'm showing  all my stuff I want to go in let's go east us I don't know if the subscription IDE is  enter a value for application and site look we'll go East US error the resource groups cope deployment are securely under Alpha support  and need to b
e explicitly enabled okay and just I I I would like to show you but  I feel like I shouldn't do I have something well at least now you see like yeah  this one is a bit I thought I add something um I think I lost it I had like a pixelated  version even if it's not like the safest because some people could try to uh so I'm  doing easd up it's initializing it's asking me do I want to do a resource Group oh so I  don't I should have created a resource Group warning okay so let's create a resource  G
roup so we cons this clear so let's share my screen again so we want to do a  console so we could do easy for Azure CLI and then say group uh create and then  uh I think it's dashn and uh let's do um let's do a learn ASD demo and then we  have location and we'll go eastus yes I did it correctly cool so now we'll  go back in my hidden mode and I will do the ASD up so it's initializing now it's asking me to pick and it doesn't show me oh  yeah okay the list was too tiny um what oh yeah so I have n
ow learn I  can can show you this yeah I can show you this so I had like a long  long list so now I picked this one so success your application  was package or Azure and less than blah blah blah and now we have  an error of course we have an error uh provision invalid template  yeah we're missing the um the subfolder I should bring you with me again I'm using my trackpad instead of  my mouse cool okay so error deployment fail invocation action provision because that's  when we try to create the
resources we're not yet deploying the code just the  resources uh it's it's the error is deploying the infrastructure  starting deployment resource uhuh uh bad requests invalid template so the Microsoft server Farm line one  not valid name property cannot be null or empty okay so it was in the it was in the what the service plan yeah a server Farms so server Farm it's here so o plan name was there  and it's just the app name okay uh wish arm we could go maybe in the in Azure in the portal yeah s
o it definitely doesn't like  this template I feel like it was pretty tiny can I like I have the extension  right I have I had the Azure biceps stuff where is the bicep I did  install the bicep right did did it do anything so if can I do like if I do  resource okay resource and then uh test cool so now I see everything oh see  that's why Microsoft web that's where it comes from okay now I understand okay  let's help it my CR stff do web slash server server Farm that's the one I want equal what I
'm looking for  is will it scaffold the fold thing uh it just kind of like do this tax depends on asserts uh what can we do we can go if I go in the portal can go in my Resource Group and the deployment is it too big uh I think it was deployment Center maybe  why because it fail yeah the the format was not even uh let's say bicep templates and then we'll go and say  this I want to see template of that please more stuff here right we have a minimal version oh yeah function it [Music] I would like
to see the minimal  version so we have a name we have a location did we have the location for us tags SK we had a name location we had  skew I I feel like some prop but it's line one so here it's 22 septe  the 1st September of 22 could go more recent here it's just it's just that a kind property I mean we can put the kind and try again we could try also just to be faster uh we could say easy up  and it's provision I think Pro provision okay we're still failing column blah blah blah is not  vali
d is not valid a property name cannot be null or empty so it's a property  no like it doesn't say yeah property this is it this not initialized  if we go in Azure in Dev yeah I was not asking for it  right didn't ask for it this app name it just generates it I mean skew is tier and name  we had that right tier and name that's it the only different is like  the property Reserve but I I don't want it Reserve uh if we go into the duck ducks  duck uh that's a lot of stuff okay so name it's required
oh maybe show  me all the required location it's required okay this is not required  cuz we're looking for something that is required right and that's it oh at the end so just the name the location say is the name is the name not working is the name not working so let's put let's  put a name here let's put um Fring them mo blah blah let's try again clear invalid template deployment template validation fail yeah can you can you the  template resource of type Microsoft uhling one is not valid the
name  property cannot be null oh is it is it because we have that should I removed it I hope it's not that like  you cannot have like an empty no template Resource One i f it first the first should be the star a jck count can I do oh I had generate this uh  restore bicep module ah a would be cool insert resources ah I say server Farm server Farm oh that's the uh the ID oh could  that means I could reverse engineer the stuff that could be interesting uh  parameter let's delete the parameter file
move to trash and now we could  say hey generate the parameter file please okay cool up and sight location  uh okay so now if I do [Music] uh I wish so open on the side container folder  build arm template maybe the air will be clear oh oh was fast is it the  main Jon yeah main Jason is there interesting and one thing I know  here is we could create a new file same it debug do a CLI and now we could do  uh like we were doing in the other one we could validate that  and try to understand what's m
issing right so the resource  Group that we create was named what again was learn ACD demo right so that's my Resource  Group and the template f is called main so that's parameter so here here it's called Main and I don't have parameter I could  create one I'm guessing I do this no if I do this parameter can I can you not create one or maybe I don't have that that extension either uh arm I didn't have it I bust the time damn it would like to to  know a little bit come on come on bicep uh no I do
n't want a bicep file I want the arm file  I do this yeah uh a new one only the required parameter is it thinking about it it's frozen oh um he asking me where to save it  uh yeah I think here it's good save it there cool East us let's close this let's go in here  let's put same cool so now we have that so now we could say hey Main so now I could do control Dash and hopefully  the error is a little bit clearer and looks like it's the same error no no such  file oh yeah because I need to be an in
fra so it's infra infra slash and infra slash no such file directory main what okay that's how it worked H why it's not  working so oh no did it work error Okay cool so so okay what's the ER oh it's been a while since  I read those error message uh so the server Farm well that's about the server farm so error oh no error error null so the arm template were work  but somehow the biceps one doesn't work is it because of this east to west okay fill no how can I I wish I could validate  I'm sure the
re's a way to validate biceps deploy biceps file no I don't want to validate it though I  want I want to validate I don't want to deploy it should deployment pain interesting Pi a parameter okay uh what pi cope what so the biceps deployment pain  is an experimental feature uh no not let's not play with experimental  stuff I would like to be able to maybe generate a parameter  file let's go with Jason record only I feel like we didn't progress much  but why I don't understand that error AZ D prov
ision oh you can see the details what is it working now now was it the property now it's working now what did we change what did we change since last time maybe this well let okay let's let's wait to see if it's working could be cool could be cool um cool so now it's working well it's finished  deploy Resource Group so it created the three resource we were expecting the storage the plan  and the function app if we go to the function app it's Windows even though even though we  specify did we hey
Fred out cat congrats y oh we didn't specify it right oh oh it's in the plan  yeah in the plan we say Linux but the function is Windows and uh oh that's the plan that's the service plan what we said when we said Linux  and it's it shows whatever yeah the that didn't work at all um API forgot was it what was  it again was CS5 something c5m test sorry that badge is missing okay  unfortunately so it look like I have the same issue here and I have in my regular stuff uh if I go see like there's no
function oh was it isolated though runtime service plan there's something wrong so that's wrong because we did specify the um yeah that's that's not good maybe the code is still no oh like  yeah oh yeah we did just provision it that's why it's empty okay uh so what's so uh oh like I'm  not excited uh it's deploy I think I could do ACD up and it will do both well like  it will skip the I think it's um a d is it deploy cuz I didn't specify any code right right yeah I didn't specifying code okay so
at least  it create but that I create a function it's not a function I want and it's empty because I  didn't specify stuff so we'll definitely have a lot more to learn but hey trying that's and  failing that's how you learn um that'll be it I think everybody uh so today we did try  to well we didn't try we play learn a lot about biceps and try to deploy that try to find  resources uh it's kind of a new tech so feel like there's maybe documentation missing so it's a  great opportunity for us to
create parts that are missing um so we'll continue to do that  hopefully we'll find something that works quickly to fix the URL shortener uh and I will  get back to you next week have fun everybody bye

Comments