1
00:00:03,679 --> 00:00:05,540
Welcome to episode 388
2
00:00:06,000 --> 00:00:08,740
of the Microsoft Cloud IT Pro Podcast,
3
00:00:09,039 --> 00:00:11,539
recorded live on November 1, 2024.
4
00:00:12,240 --> 00:00:14,880
This is a show about Microsoft 365 and
5
00:00:14,880 --> 00:00:17,175
Azure from the perspective of IT pros and
6
00:00:17,175 --> 00:00:19,574
end users, where we discuss a topic or
7
00:00:19,574 --> 00:00:21,835
recent news and how it relates to you.
8
00:00:21,975 --> 00:00:23,894
It's time to switch back to an Azure
9
00:00:23,894 --> 00:00:25,914
topic this week. In this episode,
10
00:00:26,295 --> 00:00:27,989
we dive into Azure Bicep,
11
00:00:28,390 --> 00:00:31,589
Microsoft's streamlined language for defining cloud and front
12
00:00:31,589 --> 00:00:32,090
infrastructure.
13
00:00:32,710 --> 00:00:34,869
If you are new to infrastructure as code
14
00:00:34,869 --> 00:00:37,369
or looking to simplify your Azure deployments,
15
00:00:37,750 --> 00:00:39,670
listen in to learn how easy it is
16
00:00:39,670 --> 00:00:42,009
for you to get started with Azure Bicep.
17
00:00:44,304 --> 00:00:46,704
We shall be at Ignite for the entire
18
00:00:46,704 --> 00:00:47,524
week doing
19
00:00:47,984 --> 00:00:50,545
podcast stuff. Yes. So if you were going
20
00:00:50,545 --> 00:00:51,824
to be I know I already heard from
21
00:00:51,824 --> 00:00:53,265
one listener that said they're gonna be at
22
00:00:53,265 --> 00:00:55,344
Ignite and they wanna meet up. So all
23
00:00:55,344 --> 00:00:56,945
the rest of you that are gonna be
24
00:00:56,945 --> 00:00:59,079
at Ignite, let us know. We can say
25
00:00:59,079 --> 00:01:00,920
hi. You can be on the podcast. If
26
00:01:00,920 --> 00:01:02,200
you wanna be if you're at Ignite, you
27
00:01:02,200 --> 00:01:04,120
wanna be on a podcast, come find us
28
00:01:04,120 --> 00:01:05,239
and tell us you wanna be on the
29
00:01:05,239 --> 00:01:07,959
podcast. Maybe we'll let you on. Maybe. You're
30
00:01:07,959 --> 00:01:09,719
just giving folks a lot of A lot
31
00:01:09,719 --> 00:01:12,454
of optimism there. We will absolutely
32
00:01:12,834 --> 00:01:15,415
have you on the podcast because we love
33
00:01:15,634 --> 00:01:16,935
inviting our listeners
34
00:01:17,474 --> 00:01:19,875
to participate. No. It would be fun. If
35
00:01:19,875 --> 00:01:21,575
you're gonna be at Ignite, we would love
36
00:01:21,634 --> 00:01:23,814
to see you meet up. We'll be around,
37
00:01:23,954 --> 00:01:26,750
like you said, the entire week. So it
38
00:01:26,750 --> 00:01:28,909
should be fun, Scott. This is the 1st
39
00:01:28,909 --> 00:01:31,150
Ignite I have been to live and in
40
00:01:31,150 --> 00:01:31,650
person
41
00:01:32,109 --> 00:01:33,090
since 2019.
42
00:01:33,869 --> 00:01:35,790
I think so. I was trying to think
43
00:01:35,790 --> 00:01:37,469
back. I was I was talking to my
44
00:01:37,469 --> 00:01:39,229
wife last night at dinner while we were
45
00:01:39,229 --> 00:01:40,814
out about this. She's, oh, you're going back
46
00:01:40,814 --> 00:01:42,174
to that conference, the one that you used
47
00:01:42,174 --> 00:01:44,094
to go to all the time. Yeah. That
48
00:01:44,494 --> 00:01:45,314
that's the one.
49
00:01:45,775 --> 00:01:47,635
But, yeah, well,
50
00:01:48,334 --> 00:01:50,015
it's been a hot minute since we've been
51
00:01:50,015 --> 00:01:52,275
out there and and done this whole thing
52
00:01:52,415 --> 00:01:55,189
and seen people. So I'm looking forward to
53
00:01:55,189 --> 00:01:57,849
it. It also seems like they're expanding
54
00:01:58,230 --> 00:01:59,989
the pool a little bit. I think there
55
00:01:59,989 --> 00:02:02,069
were, like, more in person tickets and things
56
00:02:02,069 --> 00:02:04,170
that were made available for sale this year.
57
00:02:04,310 --> 00:02:06,069
So it's not as big as it used
58
00:02:06,069 --> 00:02:08,969
to be, but it's getting back up there,
59
00:02:09,030 --> 00:02:10,594
like, creeping up slowly.
60
00:02:11,294 --> 00:02:13,875
So that's good to see. I'm very excited
61
00:02:13,935 --> 00:02:17,294
for just a hallway track and a week
62
00:02:17,294 --> 00:02:19,395
of digging in and
63
00:02:19,694 --> 00:02:22,129
seeing what's new and what's coming. Yeah. And
64
00:02:22,129 --> 00:02:23,889
if you are, so not only are we
65
00:02:23,889 --> 00:02:26,209
gonna be there doing podcasts, Scott, I also
66
00:02:26,370 --> 00:02:26,610
these are
67
00:02:27,409 --> 00:02:29,169
I'm not allowed to share these. I did
68
00:02:29,169 --> 00:02:31,349
get confirmation this is no longer under NDA.
69
00:02:31,489 --> 00:02:33,090
I will be helping to proctor a lab
70
00:02:33,090 --> 00:02:34,449
a couple days too. So if you want
71
00:02:34,449 --> 00:02:36,224
to go learn how to supercharge charge your
72
00:02:36,224 --> 00:02:37,924
SOC with Microsoft Defender,
73
00:02:38,224 --> 00:02:39,044
it's lab
74
00:02:39,424 --> 00:02:39,924
4
75
00:02:40,544 --> 00:02:43,104
59 in the session guide. My name is
76
00:02:43,104 --> 00:02:45,025
not on it. The proctors were not cool
77
00:02:45,025 --> 00:02:46,784
enough to get our names on it. Only
78
00:02:46,784 --> 00:02:48,544
the speakers that are leading the lab are
79
00:02:48,544 --> 00:02:51,080
on it, but I will be there helping
80
00:02:51,080 --> 00:02:53,159
to proctor that lab a couple of days
81
00:02:53,159 --> 00:02:54,860
as well. I think there's one on
82
00:02:55,400 --> 00:02:55,900
Wednesday
83
00:02:56,439 --> 00:02:57,980
and one on Friday.
84
00:02:58,520 --> 00:02:59,879
If you're gonna be there, you wanna learn
85
00:02:59,879 --> 00:03:01,879
about SOC and Microsoft Defender, get hands on
86
00:03:01,879 --> 00:03:04,439
with SOC and Microsoft Defender or Microsoft Defender
87
00:03:04,439 --> 00:03:05,260
for a SOC.
88
00:03:05,775 --> 00:03:07,134
Come join me in the lab too. It
89
00:03:07,134 --> 00:03:08,974
should be fun. Although, you told me I
90
00:03:08,974 --> 00:03:10,735
have a sick sense of fun when you
91
00:03:10,735 --> 00:03:12,334
told me when I told you that sounded
92
00:03:12,334 --> 00:03:13,854
like fun. You do have a weird way
93
00:03:13,854 --> 00:03:16,014
of expressing it sometimes, and I'll I'll I'll
94
00:03:16,014 --> 00:03:16,914
leave it at that.
95
00:03:17,294 --> 00:03:19,500
But, yeah, the session guides are live for
96
00:03:19,500 --> 00:03:21,980
Ignite, so that finally lit up. It's always
97
00:03:21,980 --> 00:03:24,219
a confusing experience when you go register for
98
00:03:24,219 --> 00:03:26,620
Ignite before the session guides are live, and
99
00:03:26,620 --> 00:03:28,700
it looks like the entire website's broken and
100
00:03:28,700 --> 00:03:30,219
you can't sign in or you can't do
101
00:03:30,219 --> 00:03:32,379
anything. I really don't understand why it continues
102
00:03:32,379 --> 00:03:33,520
to be that way, but
103
00:03:34,064 --> 00:03:34,724
it does.
104
00:03:35,025 --> 00:03:37,105
But session guides are live, so you can
105
00:03:37,105 --> 00:03:38,784
go through. And if you are going, you
106
00:03:38,784 --> 00:03:40,865
can figure out your week. Certainly, if you're
107
00:03:40,865 --> 00:03:44,385
attending in person or for digital attendees, you've
108
00:03:44,385 --> 00:03:47,525
also got the sessions open as well. So
109
00:03:47,770 --> 00:03:50,409
Ignite is not being gated to an in
110
00:03:50,409 --> 00:03:53,770
person only event. It's also got the digital
111
00:03:53,770 --> 00:03:55,210
component to it. So you got a couple
112
00:03:55,210 --> 00:03:56,969
days of that of being able to follow
113
00:03:56,969 --> 00:03:58,270
along with the sessions
114
00:03:58,729 --> 00:04:01,229
or the recordings if they don't fit into
115
00:04:01,370 --> 00:04:02,590
your time zone
116
00:04:03,354 --> 00:04:05,034
where you happen to reside at the time,
117
00:04:05,034 --> 00:04:06,335
things like that. So
118
00:04:06,794 --> 00:04:09,215
it's all out there and available
119
00:04:09,594 --> 00:04:12,175
and ready to go. Good times.
120
00:04:12,875 --> 00:04:14,655
So with that, announcements
121
00:04:15,120 --> 00:04:17,120
out of the way, I think. No more
122
00:04:17,120 --> 00:04:18,899
announcements. Should we talk about
123
00:04:19,360 --> 00:04:19,860
something
124
00:04:20,479 --> 00:04:22,399
Azure y? That should be a new word.
125
00:04:22,399 --> 00:04:25,279
Something Azure y today. Azure y? Let's talk
126
00:04:25,279 --> 00:04:25,779
about
127
00:04:26,240 --> 00:04:27,555
something Azure y.
128
00:04:31,634 --> 00:04:33,794
Do you feel overwhelmed by trying to manage
129
00:04:33,794 --> 00:04:34,854
your Office 365
130
00:04:35,154 --> 00:04:38,274
environment? Are you facing unexpected issues that disrupt
131
00:04:38,274 --> 00:04:40,995
your company's productivity? IntelliJunk is here to help.
132
00:04:40,995 --> 00:04:42,514
Much like you take your car to the
133
00:04:42,514 --> 00:04:44,970
mechanic that has specialized knowledge on how to
134
00:04:44,970 --> 00:04:47,689
best keep your car running, Intelligent helps you
135
00:04:47,689 --> 00:04:50,490
with your Microsoft Cloud environment because that's their
136
00:04:50,490 --> 00:04:50,990
expertise.
137
00:04:51,370 --> 00:04:53,610
Intelligent keeps up with the latest updates in
138
00:04:53,610 --> 00:04:55,850
the Microsoft Cloud to help keep your business
139
00:04:55,850 --> 00:04:58,134
running smoothly and ahead of the curve. Whether
140
00:04:58,134 --> 00:05:00,055
you are a small organization with just a
141
00:05:00,055 --> 00:05:02,534
few users up to an organization of several
142
00:05:02,534 --> 00:05:03,594
1000 employees,
143
00:05:03,894 --> 00:05:05,894
they want to partner with you to implement
144
00:05:05,894 --> 00:05:08,555
and administer your Microsoft Cloud technology.
145
00:05:09,334 --> 00:05:10,720
Visit them atintelliginc.com/podcast.
146
00:05:13,100 --> 00:05:13,600
That's
147
00:05:14,379 --> 00:05:14,879
intelligink.com/podcast
148
00:05:20,300 --> 00:05:22,379
for more information or to schedule a 30
149
00:05:22,379 --> 00:05:24,480
minute call to get started with them today.
150
00:05:24,699 --> 00:05:28,115
Remember, IntelliJunk focuses on the Microsoft cloud so
151
00:05:28,115 --> 00:05:29,894
you can focus on your business.
152
00:05:32,194 --> 00:05:32,935
So for
153
00:05:33,314 --> 00:05:35,314
our Azure y topic, that should be a
154
00:05:35,314 --> 00:05:37,394
new word. I did not sleep enough last
155
00:05:37,394 --> 00:05:39,350
night, Scott. You're gonna have to try really
156
00:05:39,350 --> 00:05:41,050
hard to keep me focused today.
157
00:05:41,509 --> 00:05:43,770
We have not talked about this a ton.
158
00:05:43,910 --> 00:05:46,149
We had one recording, I think, we did
159
00:05:46,149 --> 00:05:47,990
maybe a couple years, like, ready to go
160
00:05:47,990 --> 00:05:50,230
with AC, mentioned it in passing a lot,
161
00:05:50,230 --> 00:05:51,449
but we decided
162
00:05:52,214 --> 00:05:54,714
to dive into a little bit of
163
00:05:55,334 --> 00:05:55,834
bicep
164
00:05:56,375 --> 00:05:59,654
today, not our muscles because those are sadly
165
00:05:59,654 --> 00:06:01,814
lacking, at least mine are. I will speak
166
00:06:01,814 --> 00:06:04,314
for myself, but the declaratively
167
00:06:05,334 --> 00:06:06,954
deploying Azure resources
168
00:06:07,689 --> 00:06:11,310
by step instead of using JSON templates for
169
00:06:11,529 --> 00:06:14,430
going in, creating resources, deploying resources,
170
00:06:15,209 --> 00:06:15,709
infrastructure
171
00:06:16,250 --> 00:06:16,750
as
172
00:06:17,209 --> 00:06:18,430
as code
173
00:06:18,810 --> 00:06:19,870
type of topics
174
00:06:20,250 --> 00:06:21,310
because infrastructure
175
00:06:21,689 --> 00:06:22,189
guys
176
00:06:22,495 --> 00:06:25,214
now must be developers, Scott. I have resigned
177
00:06:25,214 --> 00:06:27,154
myself to the fact that to some extent,
178
00:06:27,214 --> 00:06:30,254
we are developers now. We're not developers, but
179
00:06:30,254 --> 00:06:33,134
we're still scripters, and I I continue to
180
00:06:33,134 --> 00:06:35,074
maintain that it is helpful to
181
00:06:35,539 --> 00:06:38,019
think like a developer as an IT pro.
182
00:06:38,019 --> 00:06:41,399
Like, there are many constructs of consuming functions,
183
00:06:42,259 --> 00:06:42,759
doing
184
00:06:43,060 --> 00:06:45,959
manipulation between data types, say, casting
185
00:06:46,979 --> 00:06:49,959
integers to strings or things like that.
186
00:06:50,564 --> 00:06:51,465
There are concepts
187
00:06:52,085 --> 00:06:55,205
of object oriented programming inside of some of
188
00:06:55,205 --> 00:06:57,925
the scripting languages, especially PowerShell comes to mind
189
00:06:57,925 --> 00:07:00,324
here as something we work with every day.
190
00:07:00,324 --> 00:07:02,165
If somebody's ever worked with an object in
191
00:07:02,165 --> 00:07:03,305
PowerShell, congratulations.
192
00:07:03,764 --> 00:07:05,225
You too are now a developer.
193
00:07:05,830 --> 00:07:08,150
You've got that going for you. There there's
194
00:07:08,150 --> 00:07:10,810
just a whole bunch going on between casting,
195
00:07:11,590 --> 00:07:12,330
data types,
196
00:07:13,110 --> 00:07:13,610
consumption,
197
00:07:14,790 --> 00:07:17,189
and uses of functions, all these kinds of
198
00:07:17,189 --> 00:07:19,129
things. And I think Bicep,
199
00:07:19,435 --> 00:07:20,714
like, one of the things that can clue
200
00:07:20,714 --> 00:07:23,035
you in that it's maybe a little bit
201
00:07:23,035 --> 00:07:24,254
more than just
202
00:07:24,954 --> 00:07:25,454
declarative
203
00:07:26,074 --> 00:07:27,375
infrastructure as code
204
00:07:27,834 --> 00:07:30,175
is Bicep is a
205
00:07:30,555 --> 00:07:34,095
domain specific language or a DSL.
206
00:07:35,729 --> 00:07:38,149
So when we say domain specific language,
207
00:07:38,689 --> 00:07:41,169
there are other languages out there. So let's
208
00:07:41,169 --> 00:07:42,709
think like programming languages
209
00:07:43,089 --> 00:07:43,589
like
210
00:07:44,129 --> 00:07:45,349
dot net, Python,
211
00:07:45,729 --> 00:07:46,229
Java,
212
00:07:46,529 --> 00:07:48,149
Go, things like that.
213
00:07:48,545 --> 00:07:51,105
And those can all be used across a
214
00:07:51,105 --> 00:07:54,705
bunch of domains. They're more generic. Java runs
215
00:07:54,705 --> 00:07:55,925
on multiple platforms.
216
00:07:56,305 --> 00:07:58,225
It's something that it's meant to pick up
217
00:07:58,225 --> 00:07:59,824
and you put your logic into it and
218
00:07:59,824 --> 00:08:02,139
you go from there. So you could absolutely,
219
00:08:02,199 --> 00:08:04,839
say, pick up, like, the Java management playing
220
00:08:04,839 --> 00:08:05,339
SDKs
221
00:08:05,720 --> 00:08:06,220
that
222
00:08:06,600 --> 00:08:08,699
Microsoft and Azure provide,
223
00:08:09,000 --> 00:08:11,479
and you could use those management playing SDKs
224
00:08:11,479 --> 00:08:12,540
to provision your resources.
225
00:08:13,014 --> 00:08:15,095
Or you can use something like Bicep, which
226
00:08:15,095 --> 00:08:17,415
is this domain specific language. So it means
227
00:08:17,415 --> 00:08:18,074
it's really
228
00:08:18,455 --> 00:08:22,455
a programming language, and it's designed for a
229
00:08:22,455 --> 00:08:23,675
specific application
230
00:08:24,295 --> 00:08:26,670
or a problem domain. And in this case,
231
00:08:26,750 --> 00:08:29,250
the application slash problem domain
232
00:08:29,550 --> 00:08:31,009
is Azure Resource Manager.
233
00:08:31,470 --> 00:08:31,970
And
234
00:08:32,670 --> 00:08:35,790
being able to manipulate Azure Resource Manager and
235
00:08:35,790 --> 00:08:38,750
ultimately, like, leverage the underlying REST APIs that
236
00:08:38,750 --> 00:08:39,649
power ARM
237
00:08:40,074 --> 00:08:42,174
or Azure Resource Manager using
238
00:08:42,554 --> 00:08:43,054
Bicep.
239
00:08:43,595 --> 00:08:45,615
So it goes a little bit beyond maybe
240
00:08:45,995 --> 00:08:48,174
ARM templates in that it is
241
00:08:48,634 --> 00:08:49,855
a little bit more,
242
00:08:50,714 --> 00:08:52,074
it it it is a little bit more
243
00:08:52,074 --> 00:08:53,434
programmer y at the end of the day.
244
00:08:53,434 --> 00:08:55,440
And I think you find that out pretty
245
00:08:55,440 --> 00:08:57,580
quick, especially when you start using
246
00:08:58,279 --> 00:09:01,879
some kinda common things in bicep, say, a
247
00:09:01,879 --> 00:09:03,899
for loop in your bicep template
248
00:09:04,440 --> 00:09:06,220
and consuming custom iterators,
249
00:09:07,654 --> 00:09:10,554
moving into more formal, like, objects,
250
00:09:11,095 --> 00:09:11,595
and
251
00:09:12,375 --> 00:09:14,855
having hash maps available to you. There's just
252
00:09:14,855 --> 00:09:17,495
all sorts of stuff in there that wasn't
253
00:09:17,495 --> 00:09:19,834
available to you in Arm.
254
00:09:20,289 --> 00:09:23,090
Now the interesting thing here is bicep's a
255
00:09:23,090 --> 00:09:25,490
little bit of a programming language, but when
256
00:09:25,490 --> 00:09:27,410
you go to run bicep and you go
257
00:09:27,410 --> 00:09:28,629
to run a bicep template,
258
00:09:29,009 --> 00:09:30,549
it turns out that your
259
00:09:31,090 --> 00:09:32,230
bicep template
260
00:09:33,009 --> 00:09:34,230
or your bicep
261
00:09:34,875 --> 00:09:37,274
files, like your dot bicep file, your bicep
262
00:09:37,274 --> 00:09:39,535
modules, what whatever it happens to be,
263
00:09:39,915 --> 00:09:42,975
is actually converted into a call to Arm
264
00:09:43,035 --> 00:09:45,934
and ultimately submitted as an Arm deployment.
265
00:09:46,315 --> 00:09:48,495
So let's say you create a bicep file
266
00:09:48,554 --> 00:09:49,855
where you want to
267
00:09:50,289 --> 00:09:52,370
create a virtual machine, and a virtual machine
268
00:09:52,370 --> 00:09:55,009
needs its VM, it needs a VNET, it
269
00:09:55,009 --> 00:09:57,429
needs a NIC, all those kinds of things.
270
00:09:57,570 --> 00:10:00,529
So you'll author that in Bicep, which is
271
00:10:00,529 --> 00:10:03,214
its own specific language, but then you'll maybe
272
00:10:03,214 --> 00:10:05,615
go off to, like, the CLI or PowerShell,
273
00:10:05,615 --> 00:10:06,975
and you'll say, hey. Let me do a
274
00:10:06,975 --> 00:10:07,634
new deployment.
275
00:10:08,014 --> 00:10:09,615
And just like you would pass in an
276
00:10:09,615 --> 00:10:12,414
ARM file, like that dot JSON file from
277
00:10:12,414 --> 00:10:14,610
an ARM template deployment, you would just pop
278
00:10:14,769 --> 00:10:17,169
pass in your dot bicep file and under
279
00:10:17,169 --> 00:10:19,029
the hood, that gets translated
280
00:10:19,570 --> 00:10:20,070
into
281
00:10:20,450 --> 00:10:22,289
an ARM template or a set of ARM
282
00:10:22,289 --> 00:10:24,470
templates and submitted to
283
00:10:25,009 --> 00:10:27,409
the deployment engine and then spun up from
284
00:10:27,409 --> 00:10:27,825
there.
285
00:10:28,225 --> 00:10:30,144
And then you can leverage all the same
286
00:10:30,144 --> 00:10:32,384
things as ARM templates do, including things like
287
00:10:32,384 --> 00:10:34,085
outputs on the outside
288
00:10:34,865 --> 00:10:37,264
or outputs from your ARM templates, things like
289
00:10:37,264 --> 00:10:37,764
that.
290
00:10:38,625 --> 00:10:38,945
It's
291
00:10:39,504 --> 00:10:40,304
it takes the
292
00:10:41,100 --> 00:10:42,699
I would say it takes the goodness of
293
00:10:42,699 --> 00:10:45,419
Arm and it uplevels it into just this
294
00:10:45,419 --> 00:10:48,319
very specific language, like less generic JSON,
295
00:10:48,620 --> 00:10:51,259
and being far more opinionated about here's the
296
00:10:51,259 --> 00:10:53,100
things that we're gonna let you do with
297
00:10:53,100 --> 00:10:54,720
a domain specific language
298
00:10:55,184 --> 00:10:57,205
that is focused 100%
299
00:10:57,664 --> 00:11:01,105
on Azure Resource Manager as a domain. Yes.
300
00:11:01,105 --> 00:11:02,705
And I think that's where it kinda I
301
00:11:02,705 --> 00:11:04,725
would say it sits in the middle because
302
00:11:05,184 --> 00:11:08,164
naturally someone will probably ask Terraform, where Terraform,
303
00:11:08,785 --> 00:11:10,789
you probably wouldn't consider it one of those
304
00:11:10,789 --> 00:11:12,409
domain specific languages. Terraform
305
00:11:12,710 --> 00:11:14,970
has modules for Azure, modules for
306
00:11:15,350 --> 00:11:15,850
AWS,
307
00:11:16,470 --> 00:11:18,389
so I think for GCP. I'm not a
308
00:11:18,389 --> 00:11:20,629
100% sure. Where Bicep kinda sits in the
309
00:11:20,629 --> 00:11:23,450
middle of between maybe ARM templates and Terraform
310
00:11:23,985 --> 00:11:26,065
of it's close to Terraform, but it only
311
00:11:26,065 --> 00:11:27,904
works on Azure. I think one thing to
312
00:11:27,904 --> 00:11:30,164
think about too, and I'm curious
313
00:11:30,544 --> 00:11:32,304
on your thoughts, and we've hinted at it
314
00:11:32,304 --> 00:11:34,784
some is we already have ARM templates. We
315
00:11:34,784 --> 00:11:36,164
already have all the JSON.
316
00:11:36,929 --> 00:11:40,049
What are those advantages? If people are looking
317
00:11:40,049 --> 00:11:42,129
to, we're gonna be in Azure, we wanna
318
00:11:42,129 --> 00:11:45,090
use infrastructure as code, we've been using JSON
319
00:11:45,090 --> 00:11:46,389
templates, or
320
00:11:46,929 --> 00:11:49,009
why would we go learn Bicep if we
321
00:11:49,009 --> 00:11:50,389
already know JSON templates?
322
00:11:50,769 --> 00:11:53,215
Why why use Bicep versus
323
00:11:53,674 --> 00:11:56,875
just JSON or ARM deployments or, for that
324
00:11:56,875 --> 00:11:57,375
matter,
325
00:11:57,754 --> 00:11:59,195
I know why you'd use it over the
326
00:11:59,195 --> 00:12:01,835
GUI, but over ARM templates. It's far more
327
00:12:01,835 --> 00:12:04,154
expressive, I I think is the way I
328
00:12:04,154 --> 00:12:05,790
would frame it. So
329
00:12:06,730 --> 00:12:07,230
JSON
330
00:12:07,850 --> 00:12:11,230
as a language for capturing configuration
331
00:12:12,170 --> 00:12:12,670
is
332
00:12:13,529 --> 00:12:14,670
pretty inflexible.
333
00:12:15,290 --> 00:12:18,170
It's not specific to ARM. JSON's just a
334
00:12:18,170 --> 00:12:20,430
thing that's out there, JavaScript object notation.
335
00:12:20,865 --> 00:12:23,184
So there's lots of solutions that leverage JSON,
336
00:12:23,184 --> 00:12:25,264
and you can certainly have, like, rules for
337
00:12:25,264 --> 00:12:26,965
JSON. K. It must pass
338
00:12:27,424 --> 00:12:29,985
this set of linting rules, things like that,
339
00:12:29,985 --> 00:12:33,024
commas in the right places, closing strings, all
340
00:12:33,024 --> 00:12:34,820
the all that kind of stuff. But it's
341
00:12:34,820 --> 00:12:36,179
still just JSON at the end of the
342
00:12:36,179 --> 00:12:38,259
day. Like, there's nothing specific in there that
343
00:12:38,259 --> 00:12:41,379
says, oh, this is ARM specific or Azure
344
00:12:41,379 --> 00:12:44,419
Resource Manager specific, and that's where Bicep's gonna
345
00:12:44,419 --> 00:12:46,485
come in. So it's gonna be more expressive
346
00:12:46,485 --> 00:12:48,884
in that it is ARM specific, and it's
347
00:12:48,884 --> 00:12:50,504
gonna be very geared and opinionated
348
00:12:50,805 --> 00:12:53,705
towards just doing ARM over just straight JSON
349
00:12:54,004 --> 00:12:56,024
and having to figure out the linter and
350
00:12:56,325 --> 00:12:58,004
and things that you're gonna pick along the
351
00:12:58,004 --> 00:13:00,105
way for it. And the other is
352
00:13:00,459 --> 00:13:02,959
it really is like a little miniature programming
353
00:13:03,019 --> 00:13:03,519
language.
354
00:13:04,220 --> 00:13:05,360
Again, things like
355
00:13:05,899 --> 00:13:07,279
native for loops
356
00:13:07,820 --> 00:13:08,320
inside
357
00:13:08,860 --> 00:13:10,000
of your
358
00:13:10,539 --> 00:13:11,039
bicep
359
00:13:11,740 --> 00:13:14,159
your bicep templates or your modules.
360
00:13:14,924 --> 00:13:18,144
You can have custom user defined data types,
361
00:13:18,365 --> 00:13:18,865
which
362
00:13:19,245 --> 00:13:21,404
you can actually have, like, in a Bicep
363
00:13:21,404 --> 00:13:23,085
file, you can have a type that's an
364
00:13:23,085 --> 00:13:25,164
object, and you can have an object with,
365
00:13:25,164 --> 00:13:27,299
like, dot properties on it. So let me
366
00:13:27,299 --> 00:13:29,639
say so so maybe for a virtual machine,
367
00:13:30,179 --> 00:13:31,700
when I spin up a virtual machine, it
368
00:13:31,700 --> 00:13:33,860
has a SKU or a VM family, it
369
00:13:33,860 --> 00:13:36,100
has a name, things like that. So I
370
00:13:36,100 --> 00:13:38,100
would I could absolutely define all those as
371
00:13:38,100 --> 00:13:40,455
individual parameters or things like that, or I
372
00:13:40,455 --> 00:13:41,975
could just group them all into a single
373
00:13:41,975 --> 00:13:44,055
object. I could have, like, my VM, and
374
00:13:44,055 --> 00:13:45,815
then inside that object, I could have a
375
00:13:45,815 --> 00:13:48,295
property called name that's of type string. I
376
00:13:48,295 --> 00:13:50,375
could have a property of SKU of type
377
00:13:50,375 --> 00:13:52,695
string. I could have a property of number
378
00:13:52,695 --> 00:13:53,355
of nicks
379
00:13:53,980 --> 00:13:56,059
of type integer, things like that, and then
380
00:13:56,059 --> 00:13:58,539
I could even set default values around those.
381
00:13:58,539 --> 00:14:00,460
And then I just consume that object and
382
00:14:00,460 --> 00:14:01,919
pass that object around
383
00:14:02,299 --> 00:14:02,799
within
384
00:14:03,259 --> 00:14:04,559
my bicep modules
385
00:14:05,500 --> 00:14:07,500
and and templates and things like that along
386
00:14:07,500 --> 00:14:07,965
the way.
387
00:14:08,605 --> 00:14:10,524
I think that's super powerful for you to
388
00:14:10,524 --> 00:14:12,465
have. There's a ton of
389
00:14:12,845 --> 00:14:15,504
built in functions around things.
390
00:14:16,125 --> 00:14:18,945
So there's a bunch of array functions.
391
00:14:19,725 --> 00:14:22,865
There's way more for dates and times
392
00:14:23,379 --> 00:14:25,480
and kinda date and time formatting.
393
00:14:26,259 --> 00:14:29,320
There are specific functions that you have available
394
00:14:30,019 --> 00:14:30,519
around
395
00:14:30,820 --> 00:14:33,299
numbers. So, say, like, casting something as an
396
00:14:33,299 --> 00:14:36,039
integer, being able to do, min and max.
397
00:14:36,195 --> 00:14:37,715
Say you have an array of items and
398
00:14:37,715 --> 00:14:39,894
you wanna access an array in in items,
399
00:14:40,355 --> 00:14:42,674
you can do things like dot first or
400
00:14:42,674 --> 00:14:45,154
dot last in in a collection as you
401
00:14:45,154 --> 00:14:46,215
pass them through.
402
00:14:46,595 --> 00:14:50,399
There's tons and tons of string functions. There's
403
00:14:50,559 --> 00:14:53,279
30 plus string functions out there. So things
404
00:14:53,279 --> 00:14:55,600
you're used to maybe from Armland, say unique
405
00:14:55,600 --> 00:14:58,500
string, like, unique string still exists over here,
406
00:14:58,720 --> 00:15:00,800
but it's actually way more powerful because it
407
00:15:00,800 --> 00:15:01,940
supports, like, parameters
408
00:15:02,240 --> 00:15:02,740
for
409
00:15:03,284 --> 00:15:05,605
seeding the hash and for length of the
410
00:15:05,605 --> 00:15:08,904
hash. You've got GUIDs. You've got string padding,
411
00:15:09,605 --> 00:15:12,644
string trimming, like trim left, trim right to
412
00:15:12,644 --> 00:15:13,945
upper to lower.
413
00:15:14,644 --> 00:15:16,884
You can pull out like, there there's functions
414
00:15:16,884 --> 00:15:17,704
for manipulating
415
00:15:18,004 --> 00:15:20,370
URLs. Say you're working with, I don't know,
416
00:15:20,370 --> 00:15:22,049
a storage account. 1 of the outputs for
417
00:15:22,049 --> 00:15:23,570
creating the storage account is what the primary
418
00:15:23,570 --> 00:15:26,529
endpoint is. Say you wanted to do something
419
00:15:26,529 --> 00:15:28,490
with that URI as it comes back, there
420
00:15:28,610 --> 00:15:30,789
there's functions available for that.
421
00:15:31,245 --> 00:15:32,225
Lambda functions,
422
00:15:32,524 --> 00:15:33,424
file functions.
423
00:15:34,285 --> 00:15:37,825
Let's see. There's functions specific to parameters
424
00:15:38,285 --> 00:15:41,664
within your templates that you create in Bicep.
425
00:15:42,125 --> 00:15:43,884
So I don't know. Like, one of the
426
00:15:43,884 --> 00:15:46,044
fun things you can do in a Bicep
427
00:15:46,044 --> 00:15:48,519
file that you can certainly do
428
00:15:48,899 --> 00:15:50,899
in, like, a Bash script or a PowerShell
429
00:15:50,899 --> 00:15:52,759
script and pass it in as a parameter
430
00:15:53,059 --> 00:15:54,579
in an ARM template, but you gotta go
431
00:15:54,579 --> 00:15:55,639
through that extra machination,
432
00:15:56,259 --> 00:15:56,759
is
433
00:15:57,299 --> 00:15:59,299
Bicep has the ability to do things like
434
00:15:59,299 --> 00:16:00,600
read environment variables.
435
00:16:00,975 --> 00:16:02,834
That's cool. Right? Like, just have
436
00:16:04,095 --> 00:16:07,294
environment variables spun up within your shell, and
437
00:16:07,294 --> 00:16:10,095
you can actually pull those things in. It
438
00:16:10,095 --> 00:16:12,195
has native support for pulling secrets
439
00:16:12,575 --> 00:16:15,480
out of things like Key Vault. So if
440
00:16:15,480 --> 00:16:16,860
you're doing the deployment
441
00:16:17,160 --> 00:16:18,299
as an entity
442
00:16:18,759 --> 00:16:20,759
or a user identity that has the ability
443
00:16:20,759 --> 00:16:22,440
to say talk to a Key Vault, there's
444
00:16:22,440 --> 00:16:24,440
a get secret function where you can reach
445
00:16:24,440 --> 00:16:25,419
out to a specific
446
00:16:25,960 --> 00:16:29,240
subscription resource group Key Vault and pull a
447
00:16:29,240 --> 00:16:30,379
particular secret
448
00:16:30,805 --> 00:16:33,205
and even pull a particular secret by its
449
00:16:33,205 --> 00:16:35,705
version, things like that. So it it's
450
00:16:36,165 --> 00:16:37,845
way more powerful at the end of the
451
00:16:37,845 --> 00:16:40,585
day. Like, it's just more expressive.
452
00:16:41,125 --> 00:16:42,985
Yes. A 100%. And that's,
453
00:16:43,329 --> 00:16:45,509
again, JSON, they're pretty
454
00:16:45,889 --> 00:16:47,970
static. You can't there's you can't come close
455
00:16:47,970 --> 00:16:49,350
to doing all that type of stuff,
456
00:16:49,809 --> 00:16:51,669
just writing ARM files to JSON.
457
00:16:52,450 --> 00:16:53,889
So I think now that we've gotten that
458
00:16:53,889 --> 00:16:56,345
out of the way, is maybe getting started
459
00:16:56,345 --> 00:16:58,184
with it. If you wanna set up a
460
00:16:58,184 --> 00:16:59,485
bicep environment,
461
00:17:00,184 --> 00:17:00,684
and
462
00:17:01,065 --> 00:17:03,804
do you wanna jump there? We've got best
463
00:17:03,865 --> 00:17:04,365
practices
464
00:17:04,664 --> 00:17:07,785
with bicep, which we go into next. Install
465
00:17:07,785 --> 00:17:10,204
bicep tools. We should probably start with tools
466
00:17:10,265 --> 00:17:12,160
and installing tools. So this is a little
467
00:17:12,160 --> 00:17:14,559
bit like a programming language again. So just
468
00:17:14,559 --> 00:17:16,099
if you were going to
469
00:17:16,400 --> 00:17:18,900
write dot net code on your,
470
00:17:19,759 --> 00:17:22,799
local PC, you're gonna wanna install the the
471
00:17:22,799 --> 00:17:24,980
dot net framework, and you might wanna install
472
00:17:25,039 --> 00:17:26,180
some helper extensions.
473
00:17:26,684 --> 00:17:29,164
You might wanna have, like, Visual Studio Code,
474
00:17:29,164 --> 00:17:30,845
things like that all stood up and ready
475
00:17:30,845 --> 00:17:31,505
to go.
476
00:17:31,805 --> 00:17:33,424
So I think Bicep Tools
477
00:17:33,805 --> 00:17:34,305
is
478
00:17:34,684 --> 00:17:35,184
a
479
00:17:35,485 --> 00:17:37,184
great place to start. So
480
00:17:37,565 --> 00:17:39,884
first, you're gonna want some things that you
481
00:17:39,884 --> 00:17:43,029
probably already have. And those things are, say,
482
00:17:43,029 --> 00:17:45,289
like the Azure CLI and Azure PowerShell.
483
00:17:45,589 --> 00:17:47,109
That's because, ultimately, at the end of the
484
00:17:47,109 --> 00:17:48,889
day, Bicep is
485
00:17:49,190 --> 00:17:52,549
about manipulating your infrastructure or your resources within
486
00:17:52,549 --> 00:17:53,049
Azure.
487
00:17:53,545 --> 00:17:55,704
Again, it all gets converted into ARM templates
488
00:17:55,704 --> 00:17:57,964
and ARM deployments when you do those submissions.
489
00:17:58,184 --> 00:17:59,865
So the easiest way one of the easiest
490
00:17:59,865 --> 00:18:02,025
ways to do those submissions in that testing
491
00:18:02,025 --> 00:18:04,825
is from the command line with things like
492
00:18:04,825 --> 00:18:05,325
PowerShell
493
00:18:05,945 --> 00:18:08,424
and CLI where you're just going to submit
494
00:18:08,424 --> 00:18:09,244
a new deployment,
495
00:18:09,839 --> 00:18:10,980
but rather
496
00:18:11,920 --> 00:18:14,960
than submitting that deployment against a dot JSON
497
00:18:14,960 --> 00:18:16,740
file and an ARM template,
498
00:18:17,039 --> 00:18:18,640
you would just do a bicep file. And
499
00:18:18,640 --> 00:18:21,440
it's all the same commandlets and same sets
500
00:18:21,440 --> 00:18:21,884
of
501
00:18:22,285 --> 00:18:24,845
command line parameters that you've been using along
502
00:18:24,845 --> 00:18:27,265
the way. So once you've got PowerShell CLI
503
00:18:27,325 --> 00:18:29,904
installed, you're all ready to deploy Bicep templates.
504
00:18:30,125 --> 00:18:32,045
So the next step is, let me go
505
00:18:32,045 --> 00:18:34,125
and create a Bicep template. You're gonna want
506
00:18:34,125 --> 00:18:36,045
some tooling to help you along the way
507
00:18:36,045 --> 00:18:36,945
to do that. Like,
508
00:18:37,410 --> 00:18:39,250
it's just a text file at the end
509
00:18:39,250 --> 00:18:41,090
of the day. Like, it's a dot bicep
510
00:18:41,090 --> 00:18:43,250
file is the extension on it. That being
511
00:18:43,250 --> 00:18:45,730
said, you're gonna want some things like maybe
512
00:18:45,730 --> 00:18:47,970
a linter to help you, something that can
513
00:18:47,970 --> 00:18:49,190
help you auto format.
514
00:18:49,644 --> 00:18:51,025
Helps you have autocomplete
515
00:18:51,724 --> 00:18:52,704
and IntelliSense
516
00:18:53,005 --> 00:18:54,545
as you're authoring these files.
517
00:18:55,085 --> 00:18:56,684
The easiest way and and the way that
518
00:18:56,684 --> 00:18:57,825
I go about it personally
519
00:18:58,765 --> 00:19:02,125
is just using Visual Studio Code, and Visual
520
00:19:02,125 --> 00:19:04,890
Studio Code has a native bicep extension. It's
521
00:19:04,890 --> 00:19:05,950
available in the marketplace.
522
00:19:06,570 --> 00:19:09,150
It's authored and and maintained
523
00:19:09,450 --> 00:19:11,549
and made available from Microsoft.
524
00:19:12,170 --> 00:19:14,970
The other option that's available to you is
525
00:19:14,970 --> 00:19:15,470
to
526
00:19:15,850 --> 00:19:16,750
go out
527
00:19:17,244 --> 00:19:19,265
and leverage Visual Studio.
528
00:19:20,044 --> 00:19:21,804
So that's an option. If you're just a
529
00:19:21,804 --> 00:19:23,265
Visual Studio developer,
530
00:19:23,724 --> 00:19:25,644
totally doable. You can go and make that
531
00:19:25,644 --> 00:19:26,144
happen.
532
00:19:26,525 --> 00:19:30,039
There's also a formal bicep extension for for
533
00:19:30,039 --> 00:19:32,200
Visual Studio full on. I don't know that
534
00:19:32,200 --> 00:19:34,519
you need Visual Studio full on. Like, Versus
535
00:19:34,519 --> 00:19:35,500
Code is free.
536
00:19:35,799 --> 00:19:37,980
The extension that's there is super powerful.
537
00:19:38,440 --> 00:19:41,559
You have native inline terminal support in Versus
538
00:19:41,559 --> 00:19:43,079
Code. Like, I'm just used to it from
539
00:19:43,079 --> 00:19:44,295
working in it over the years,
540
00:19:44,775 --> 00:19:46,295
and that tends to be the place that
541
00:19:46,295 --> 00:19:49,035
I go. Like, there's no other special tool
542
00:19:49,095 --> 00:19:51,674
or thing like that that you have
543
00:19:52,055 --> 00:19:54,055
to go out and grab. There's no, oh,
544
00:19:54,055 --> 00:19:57,015
grab the bicep development studio or anything like
545
00:19:57,015 --> 00:19:59,039
that. Just go grab Versus Code. You probably
546
00:19:59,039 --> 00:20:01,359
already have Versus Code. You probably already have
547
00:20:01,359 --> 00:20:04,000
PowerShell. There's CLI installed already if you're working
548
00:20:04,000 --> 00:20:06,000
with Azure. So really, the only thing you
549
00:20:06,000 --> 00:20:07,539
need is the Bicep extension,
550
00:20:07,920 --> 00:20:10,900
and from there, you're off to the races,
551
00:20:11,164 --> 00:20:12,444
And you can go do what you need
552
00:20:12,444 --> 00:20:14,284
to do. I saw the one for Visual
553
00:20:14,284 --> 00:20:16,684
Studio, and it made me laugh because I
554
00:20:16,684 --> 00:20:18,125
was like, I don't know. I think the
555
00:20:18,125 --> 00:20:20,125
last time I opened Visual Studio was writing
556
00:20:20,125 --> 00:20:21,184
SharePoint 2013
557
00:20:21,804 --> 00:20:23,130
extensions and stuff.
558
00:20:23,609 --> 00:20:24,650
I'm with you. I don't know why you
559
00:20:24,650 --> 00:20:26,410
would use Visual Studio Code for Bicep, but
560
00:20:26,410 --> 00:20:28,650
if you really like visuals or why do
561
00:20:28,650 --> 00:20:31,289
you use Visual Studio? If you really like
562
00:20:31,289 --> 00:20:33,369
it, it's there. But I'm with you. Visual
563
00:20:33,369 --> 00:20:34,750
Studio Code for all these
564
00:20:35,130 --> 00:20:35,950
super simple,
565
00:20:36,285 --> 00:20:38,384
lightweight, works the same,
566
00:20:38,684 --> 00:20:39,424
more or less,
567
00:20:40,045 --> 00:20:41,424
on macOS, Windows,
568
00:20:41,725 --> 00:20:42,465
all of those.
569
00:20:42,924 --> 00:20:45,404
And then that Bicep extension. Yeah. I was
570
00:20:45,404 --> 00:20:47,164
just looking So once you've got all that
571
00:20:47,164 --> 00:20:49,085
installed, I was gonna say that once you
572
00:20:49,085 --> 00:20:51,505
got that installed, your next step is
573
00:20:52,019 --> 00:20:54,500
probably go get hands on with a bicep
574
00:20:54,500 --> 00:20:57,059
file. I know some folks like to watch
575
00:20:57,059 --> 00:20:59,299
videos. You can absolutely go out to YouTube
576
00:20:59,299 --> 00:20:59,799
and
577
00:21:00,180 --> 00:21:01,619
take a look around for these or if
578
00:21:01,619 --> 00:21:03,859
you have a subscription to LinkedIn Learning, things
579
00:21:03,859 --> 00:21:06,144
like that. There's formal classes out there, but
580
00:21:06,144 --> 00:21:07,585
one of your next steps might be to
581
00:21:07,585 --> 00:21:08,964
just go out and
582
00:21:09,424 --> 00:21:11,825
spin up a template in Versus codes. There's
583
00:21:11,825 --> 00:21:13,285
there's a pretty good quick start
584
00:21:13,904 --> 00:21:15,285
on Microsoft Learn
585
00:21:15,904 --> 00:21:18,704
where it just walks you through creating kind
586
00:21:18,704 --> 00:21:19,589
of your first
587
00:21:20,069 --> 00:21:21,049
bicep file
588
00:21:21,750 --> 00:21:22,970
in Versus Code,
589
00:21:23,349 --> 00:21:26,890
and that'll walk you down a path of
590
00:21:26,950 --> 00:21:28,089
working with resources,
591
00:21:29,269 --> 00:21:31,450
going through the general machinations,
592
00:21:31,990 --> 00:21:33,289
and things like that.
593
00:21:33,704 --> 00:21:35,544
And then once you've got a handle on
594
00:21:35,544 --> 00:21:38,184
what a default set or or kind of
595
00:21:38,184 --> 00:21:40,664
a minimal bicep file is, then you can
596
00:21:40,664 --> 00:21:42,365
start thinking about, like, optimizations
597
00:21:42,744 --> 00:21:44,984
or what are some new good next steps
598
00:21:44,984 --> 00:21:46,505
for me to take, things like that. Is
599
00:21:46,505 --> 00:21:47,784
there a good get I'll repo. I was
600
00:21:47,784 --> 00:21:50,359
looking we threw together this Azure quick start
601
00:21:50,359 --> 00:21:53,400
templates, but this is also templates that looks
602
00:21:53,400 --> 00:21:54,299
like for
603
00:21:55,000 --> 00:21:56,839
everything, ARM templates. I was trying to look
604
00:21:56,839 --> 00:21:58,619
through if there's a spot where they consolidated
605
00:21:59,079 --> 00:22:00,539
everything in here
606
00:22:01,079 --> 00:22:01,579
under
607
00:22:02,119 --> 00:22:05,125
some Bicep files. Is this one really all
608
00:22:06,065 --> 00:22:08,625
arm templates? No. It's arm and bicep all
609
00:22:08,625 --> 00:22:10,565
mixed together. That's not helpful.
610
00:22:12,625 --> 00:22:14,304
If you go in and it it it
611
00:22:14,304 --> 00:22:16,625
is helpful though because, again, bicep and arm
612
00:22:16,625 --> 00:22:19,009
are You can see how they relate, how
613
00:22:19,009 --> 00:22:20,769
one leads to the other. Oh, here they
614
00:22:20,769 --> 00:22:22,690
are. 6 to 1, half half dozen of
615
00:22:22,690 --> 00:22:25,009
the other. Right? So as you're going through
616
00:22:25,009 --> 00:22:26,769
the quick starts repo, one of the things
617
00:22:26,769 --> 00:22:29,349
you'll see is that there's dot bicep files
618
00:22:29,730 --> 00:22:32,389
alongside the dot JSON files
619
00:22:32,714 --> 00:22:34,654
that existed out there previously
620
00:22:35,035 --> 00:22:35,855
from the
621
00:22:36,394 --> 00:22:38,474
from the ARM templates that were available for
622
00:22:38,474 --> 00:22:38,974
you.
623
00:22:39,515 --> 00:22:41,035
I know where you say, hey, maybe I
624
00:22:41,035 --> 00:22:42,634
think that's not helpful, but I would make
625
00:22:42,634 --> 00:22:44,714
the argument that it's actually super helpful because
626
00:22:44,714 --> 00:22:47,759
if I'm already familiar with ARM templates and
627
00:22:47,759 --> 00:22:49,539
the construct of those JSON files,
628
00:22:50,240 --> 00:22:51,779
now I can see side by side
629
00:22:52,559 --> 00:22:53,620
and do that mental
630
00:22:54,000 --> 00:22:56,640
mental map and translation in there. I can
631
00:22:56,640 --> 00:22:58,580
see that. And they are sorted by resources.
632
00:22:58,640 --> 00:23:00,825
So if you go out to this GitHub
633
00:23:00,825 --> 00:23:03,865
repo and you start looking through, like, they
634
00:23:03,865 --> 00:23:05,565
have a bunch of other stuff around
635
00:23:05,944 --> 00:23:08,105
demos and modules, but under the quick starts
636
00:23:08,105 --> 00:23:10,204
then it's broken down by things like
637
00:23:10,505 --> 00:23:11,244
app services
638
00:23:12,265 --> 00:23:12,924
on ACR.
639
00:23:13,224 --> 00:23:15,164
You have things in here for
640
00:23:15,730 --> 00:23:17,669
app services with HTTP
641
00:23:18,049 --> 00:23:19,109
scaling rules,
642
00:23:19,490 --> 00:23:20,869
you have automation
643
00:23:21,569 --> 00:23:22,069
accounts
644
00:23:22,529 --> 00:23:23,589
and configuration,
645
00:23:24,369 --> 00:23:25,509
all the things Databricks,
646
00:23:26,049 --> 00:23:26,549
Devices,
647
00:23:27,569 --> 00:23:30,345
HD Insights, Key Vault. And then once you
648
00:23:30,345 --> 00:23:33,144
get down there, they have different ones. Like
649
00:23:33,144 --> 00:23:34,444
under Key Vault, there's,
650
00:23:35,464 --> 00:23:38,204
what, maybe 10 different 10, 11 different samples
651
00:23:38,664 --> 00:23:40,825
of Key Vaults with private endpoints, Key Vaults
652
00:23:40,825 --> 00:23:42,605
with managed identity role assignment,
653
00:23:43,065 --> 00:23:45,180
just creating Key Vaults. And that's
654
00:23:45,640 --> 00:23:47,900
where under certain ones, not all of them,
655
00:23:47,960 --> 00:23:49,640
you will find Not all of them have
656
00:23:49,640 --> 00:23:51,320
it. Yes. Not all of them have it,
657
00:23:51,320 --> 00:23:53,880
but under certain ones, you will have, like
658
00:23:53,880 --> 00:23:56,200
you said, those JSON files and those dot
659
00:23:56,200 --> 00:23:57,980
bicep files that you can
660
00:23:58,359 --> 00:24:00,335
open up, look at, compare,
661
00:24:00,634 --> 00:24:02,154
figure out how to translate from one to
662
00:24:02,154 --> 00:24:04,255
the other. You've got all those out there.
663
00:24:04,394 --> 00:24:05,535
You can also
664
00:24:06,474 --> 00:24:06,974
export
665
00:24:07,355 --> 00:24:07,855
your
666
00:24:08,154 --> 00:24:09,375
existing resources.
667
00:24:09,914 --> 00:24:11,434
So for a long time, you've been able
668
00:24:11,434 --> 00:24:11,934
to
669
00:24:12,559 --> 00:24:14,720
export, like, an ARM template of your existing
670
00:24:14,720 --> 00:24:15,220
resources.
671
00:24:15,599 --> 00:24:16,559
I think it's a little bit of a
672
00:24:16,559 --> 00:24:19,279
misnomer that we tell customers that, like, oh,
673
00:24:19,279 --> 00:24:21,119
you can export it, but you can't actually
674
00:24:21,119 --> 00:24:23,119
run that template and then have it spin
675
00:24:23,119 --> 00:24:25,599
up the same resource again. Yeah. That being
676
00:24:25,599 --> 00:24:27,134
said, like, you at least get it as,
677
00:24:27,295 --> 00:24:28,275
like, a manifestation
678
00:24:28,654 --> 00:24:29,474
or an example
679
00:24:29,934 --> 00:24:32,115
of the things that are sitting out there.
680
00:24:32,575 --> 00:24:34,515
You can export to ARM,
681
00:24:35,055 --> 00:24:37,375
to an ARM template, export to Bicep. They
682
00:24:37,375 --> 00:24:40,835
recently added the ability to export to Terraform
683
00:24:40,894 --> 00:24:43,720
as well. So you mentioned Terraform earlier.
684
00:24:44,259 --> 00:24:46,119
Terraform is all built around HCL.
685
00:24:46,579 --> 00:24:48,599
HCL is a scripting language.
686
00:24:48,980 --> 00:24:50,679
So Terraform is
687
00:24:51,139 --> 00:24:54,339
also a domain specific language. Right? It's another
688
00:24:54,339 --> 00:24:56,545
set of these things where you're doing maybe
689
00:24:56,545 --> 00:24:59,365
a little bit more programming than just generic
690
00:25:00,945 --> 00:25:01,765
generic JSON
691
00:25:02,065 --> 00:25:04,164
kind of thing and JSON validation,
692
00:25:04,545 --> 00:25:07,184
which also shows, hey, Microsoft's moving in the
693
00:25:07,184 --> 00:25:08,785
direction that some of these other things have
694
00:25:08,785 --> 00:25:11,009
been going for a while now, like HashiCorp
695
00:25:11,230 --> 00:25:12,910
with TerraForm. This is one thing. I have
696
00:25:12,910 --> 00:25:15,549
not written much bicep. I will be honest.
697
00:25:15,549 --> 00:25:17,549
It is it's on my list. Remember that
698
00:25:17,549 --> 00:25:19,150
list? I haven't talked about my list in
699
00:25:19,150 --> 00:25:19,730
a while.
700
00:25:21,230 --> 00:25:23,309
Yeah. Yeah. It it is a thing that's
701
00:25:23,309 --> 00:25:25,304
out there. Oh, one other option for you
702
00:25:25,304 --> 00:25:27,464
just while we're talking about, hey, maybe getting
703
00:25:27,464 --> 00:25:28,365
hands on
704
00:25:28,744 --> 00:25:31,325
and finding examples and things like that is
705
00:25:31,625 --> 00:25:33,005
it's also possible
706
00:25:33,384 --> 00:25:33,884
to
707
00:25:35,065 --> 00:25:37,085
so when you execute a bicep
708
00:25:38,250 --> 00:25:38,750
script
709
00:25:39,289 --> 00:25:41,210
and you go ahead and actually do that
710
00:25:41,210 --> 00:25:43,210
deployment again, it's converted into an ARM call
711
00:25:43,210 --> 00:25:44,109
on the back end.
712
00:25:44,490 --> 00:25:47,390
So beyond going from, like, a bicep file
713
00:25:47,450 --> 00:25:49,369
to an ARM template, you can also go
714
00:25:49,369 --> 00:25:50,990
the other way, and you can decompile
715
00:25:51,289 --> 00:25:52,350
an ARM template
716
00:25:52,994 --> 00:25:54,295
and turn that
717
00:25:54,674 --> 00:25:55,174
into
718
00:25:55,555 --> 00:25:57,555
a bicep file as well. So maybe if
719
00:25:57,555 --> 00:25:59,954
you have already an investment, like, you're very
720
00:25:59,954 --> 00:26:01,714
familiar with arm templates and you're like, I
721
00:26:01,714 --> 00:26:02,994
don't know. Just put me on the path
722
00:26:02,994 --> 00:26:04,195
where I can start to figure out how
723
00:26:04,195 --> 00:26:06,519
to translate my existing stuff. You can go
724
00:26:06,519 --> 00:26:09,400
down that path as well and convert back
725
00:26:09,400 --> 00:26:11,480
the other way. Got it. The other thing
726
00:26:11,480 --> 00:26:14,119
I would say getting started, if you are
727
00:26:14,119 --> 00:26:16,920
new to this, is there is also some
728
00:26:16,920 --> 00:26:19,160
learn modules for BICEP 2. Like we talked
729
00:26:19,160 --> 00:26:20,599
about, you can just go read the learn
730
00:26:20,599 --> 00:26:21,099
documentation,
731
00:26:21,815 --> 00:26:22,714
but there is
732
00:26:23,494 --> 00:26:24,474
a learn module
733
00:26:25,015 --> 00:26:26,795
for walking through
734
00:26:27,255 --> 00:26:27,755
how
735
00:26:28,134 --> 00:26:30,795
you can start using Bicep, covering fundamentals.
736
00:26:31,255 --> 00:26:32,554
There's like the fundamentals,
737
00:26:32,855 --> 00:26:33,355
intermediate,
738
00:26:33,654 --> 00:26:34,154
advanced,
739
00:26:34,615 --> 00:26:35,595
going through different
740
00:26:35,974 --> 00:26:36,474
deployments.
741
00:26:37,559 --> 00:26:39,399
Looks like there is some for
742
00:26:39,880 --> 00:26:42,039
there's probably some in here for authoring Bicep
743
00:26:42,039 --> 00:26:42,539
files.
744
00:26:43,000 --> 00:26:44,440
But if you do want a little bit
745
00:26:44,440 --> 00:26:47,740
more of a, let's say, guided approach to
746
00:26:47,799 --> 00:26:48,779
walking through
747
00:26:49,240 --> 00:26:52,044
learning it, writing them, using them in deployment,
748
00:26:52,044 --> 00:26:55,424
pipelines as in here, using it in deployment
749
00:26:55,565 --> 00:26:59,184
stacks. There is also this learn module for
750
00:26:59,644 --> 00:27:02,684
bicep. There are tons and tons of learn
751
00:27:02,684 --> 00:27:03,809
modules out there.
752
00:27:04,130 --> 00:27:04,789
One recommendation
753
00:27:05,410 --> 00:27:08,370
that I would have for folks, and I
754
00:27:08,370 --> 00:27:09,269
keep going
755
00:27:09,650 --> 00:27:10,470
back to
756
00:27:11,009 --> 00:27:15,029
this one, is there's a specific learn module
757
00:27:15,170 --> 00:27:15,830
out there.
758
00:27:16,294 --> 00:27:18,214
Let me pull up a link to it.
759
00:27:18,214 --> 00:27:19,674
So it's called structure
760
00:27:19,974 --> 00:27:22,634
your bicep code for collaboration,
761
00:27:23,575 --> 00:27:25,095
and I think this is a really good
762
00:27:25,095 --> 00:27:27,595
one for a couple of reasons. One is
763
00:27:27,654 --> 00:27:29,515
it starts to walk you down the optimization
764
00:27:29,734 --> 00:27:30,234
path
765
00:27:30,730 --> 00:27:33,710
from the start. So it gives you this
766
00:27:34,169 --> 00:27:36,569
big long bicep file, which is more than
767
00:27:36,569 --> 00:27:38,809
just deploy a storage account, which is one
768
00:27:38,809 --> 00:27:40,089
of my annoyance when you go out and
769
00:27:40,089 --> 00:27:41,690
start with the quick starts and things. They're
770
00:27:41,690 --> 00:27:43,849
usually like deploy a storage account to play
771
00:27:43,849 --> 00:27:46,454
this single instance thing, like, yeah, I get
772
00:27:46,534 --> 00:27:48,454
single instance, but you'll probably want, a little
773
00:27:48,454 --> 00:27:50,375
bit more than that. So the the very
774
00:27:50,375 --> 00:27:53,255
first thing that does is it goes out
775
00:27:53,255 --> 00:27:54,554
and it gives you
776
00:27:55,095 --> 00:27:57,034
a getting started bicep template,
777
00:27:57,335 --> 00:28:00,750
which totally works as is. It's just not
778
00:28:00,750 --> 00:28:01,250
optimized.
779
00:28:01,549 --> 00:28:03,869
It's just not doing all the things that
780
00:28:03,869 --> 00:28:06,049
you might want it to do.
781
00:28:06,590 --> 00:28:09,250
It's got, like, bad names for parameters.
782
00:28:09,549 --> 00:28:11,710
And so that learn module walks you through
783
00:28:11,710 --> 00:28:14,884
things like how to think about naming your
784
00:28:14,884 --> 00:28:17,285
parameters, which the the guidance for naming your
785
00:28:17,285 --> 00:28:19,045
parameters in a bicep file, by the way,
786
00:28:19,045 --> 00:28:21,045
doesn't really differ from the guidance of how
787
00:28:21,045 --> 00:28:22,805
you should be naming your parameters in an
788
00:28:22,805 --> 00:28:24,164
ARM template, but I think it's a good
789
00:28:24,164 --> 00:28:24,664
reinforcement
790
00:28:25,365 --> 00:28:25,865
because
791
00:28:26,359 --> 00:28:27,880
I'm I know I'm guilty of this all
792
00:28:27,880 --> 00:28:29,080
the time where I go out and I
793
00:28:29,080 --> 00:28:30,680
create something and I just go, like, the
794
00:28:30,680 --> 00:28:32,039
easy button. I'm like, oh, I need a
795
00:28:32,039 --> 00:28:32,539
name.
796
00:28:33,000 --> 00:28:35,400
Var name equals blah blah blah. But it
797
00:28:35,400 --> 00:28:37,320
turns out that name was for a specific
798
00:28:37,320 --> 00:28:38,920
resource. It was like a name for a
799
00:28:38,920 --> 00:28:41,224
virtual machine. So what I really should have
800
00:28:41,224 --> 00:28:43,884
done was name that variable, like, var
801
00:28:44,424 --> 00:28:44,924
my
802
00:28:45,304 --> 00:28:49,224
web virtual machine, var my middle layer, my
803
00:28:49,224 --> 00:28:51,224
API layer virtual machine. Like, you should be
804
00:28:51,224 --> 00:28:53,484
far more descriptive, use camel case,
805
00:28:53,980 --> 00:28:56,059
all those kinds of things. Make sure that
806
00:28:56,059 --> 00:28:57,039
your parameters
807
00:28:57,419 --> 00:28:58,159
are typed.
808
00:28:58,539 --> 00:29:01,980
So, integers are integers, strings are strings, objects
809
00:29:01,980 --> 00:29:04,220
are objects. Of course, this is like back
810
00:29:04,220 --> 00:29:07,440
to programming language thing. This helps us leverage
811
00:29:07,500 --> 00:29:10,164
and use all of those later on.
812
00:29:10,625 --> 00:29:12,724
It also walks you down the path of
813
00:29:13,025 --> 00:29:13,765
how to
814
00:29:14,305 --> 00:29:15,605
think about structuring
815
00:29:16,144 --> 00:29:17,525
your bicep files
816
00:29:17,904 --> 00:29:18,404
because
817
00:29:18,945 --> 00:29:21,445
ARM files are very specific where the parameters
818
00:29:21,585 --> 00:29:23,589
are at the top, resources are in the
819
00:29:23,589 --> 00:29:25,829
middle, and outputs are always at the bottom.
820
00:29:25,829 --> 00:29:27,769
Right? It's just gotta follow that flow,
821
00:29:28,069 --> 00:29:29,509
to be able to lint and things like
822
00:29:29,909 --> 00:29:31,669
that's not the case with a bicep file.
823
00:29:31,669 --> 00:29:33,829
You can have a parameter here, a resource
824
00:29:33,829 --> 00:29:35,589
here. You can have an output here. You
825
00:29:35,589 --> 00:29:36,950
can have this other thing. You can have
826
00:29:36,950 --> 00:29:39,325
a function next. Like, you can just go
827
00:29:39,325 --> 00:29:41,644
wild. I think structure that thing however you
828
00:29:41,644 --> 00:29:43,644
want, but that might not be the most
829
00:29:43,644 --> 00:29:45,884
readable thing for the next person. It might
830
00:29:45,884 --> 00:29:48,444
not be the best way to leave your
831
00:29:48,444 --> 00:29:48,944
campground
832
00:29:49,325 --> 00:29:50,940
in a in a good place for the
833
00:29:50,940 --> 00:29:52,539
next camper when they come through. And you
834
00:29:52,539 --> 00:29:54,140
don't want folks having to clean up after
835
00:29:54,140 --> 00:29:56,539
you. So it it it could that module
836
00:29:56,539 --> 00:29:59,259
in particular gives you a sense of what
837
00:29:59,259 --> 00:30:01,500
some of those things are that you would
838
00:30:01,500 --> 00:30:02,159
want to
839
00:30:03,019 --> 00:30:05,515
think about along the way. And, ultimately, what
840
00:30:05,515 --> 00:30:07,035
it does is it walks you down a
841
00:30:07,035 --> 00:30:09,914
couple steps. Let's improve your parameters. Let's improve
842
00:30:09,914 --> 00:30:11,674
your parameter names. Let's make sure we put
843
00:30:11,674 --> 00:30:14,075
comments in. Oh, do you understand the difference
844
00:30:14,075 --> 00:30:18,095
between inline comments versus structured comments versus multiline
845
00:30:18,154 --> 00:30:18,654
comments?
846
00:30:19,210 --> 00:30:21,390
All those kinds of things. Are your
847
00:30:22,009 --> 00:30:23,070
are your templates
848
00:30:23,610 --> 00:30:24,110
annotated
849
00:30:24,490 --> 00:30:25,710
correctly? So
850
00:30:26,490 --> 00:30:26,990
beyond
851
00:30:27,529 --> 00:30:29,710
your things like having comments,
852
00:30:30,170 --> 00:30:33,115
have you put descriptions on your parameters? So
853
00:30:33,115 --> 00:30:35,595
in case you're asked for, like, a parameter
854
00:30:35,595 --> 00:30:37,194
input when you're running a deployment from the
855
00:30:37,194 --> 00:30:39,674
command line, have you thought about how you
856
00:30:39,674 --> 00:30:43,134
commonly structure things like resource tags and governance
857
00:30:43,194 --> 00:30:43,694
constructs?
858
00:30:44,315 --> 00:30:46,519
That's all in there. And, ultimately, it walks
859
00:30:46,519 --> 00:30:48,700
you down this path of, hey, let's optimize
860
00:30:48,919 --> 00:30:51,480
and refactor your bicep file. So it gives
861
00:30:51,480 --> 00:30:54,119
you an a and b, camera 1, camera
862
00:30:54,119 --> 00:30:56,039
2 kind of thing, and it gives you
863
00:30:56,039 --> 00:30:58,440
the flexibility and the freedom to figure it
864
00:30:58,440 --> 00:30:59,259
out your
865
00:30:59,595 --> 00:31:01,534
your yourself along the way.
866
00:31:02,154 --> 00:31:04,095
I think that's super helpful
867
00:31:04,474 --> 00:31:04,974
and
868
00:31:05,595 --> 00:31:06,974
definitely works towards
869
00:31:07,674 --> 00:31:10,794
improving just readability of bicep files and keeps
870
00:31:10,794 --> 00:31:12,634
you on a common path as the way,
871
00:31:12,634 --> 00:31:14,575
like, the creators of that
872
00:31:15,000 --> 00:31:15,900
domain language
873
00:31:16,279 --> 00:31:16,779
intended,
874
00:31:17,480 --> 00:31:18,619
walks you through rationalization
875
00:31:19,000 --> 00:31:20,539
for ordering elements.
876
00:31:21,240 --> 00:31:22,220
I think you also
877
00:31:22,759 --> 00:31:23,660
work with
878
00:31:24,279 --> 00:31:24,779
collections
879
00:31:25,240 --> 00:31:26,140
in that module.
880
00:31:27,015 --> 00:31:28,234
So collections
881
00:31:28,535 --> 00:31:31,755
allow you to have, like, multi propertied
882
00:31:32,214 --> 00:31:32,714
objects
883
00:31:33,095 --> 00:31:35,195
that you can consume in an easier way.
884
00:31:35,654 --> 00:31:37,015
One of the examples that I can think
885
00:31:37,015 --> 00:31:39,690
of again is, like, virtual machines. So virtual
886
00:31:39,830 --> 00:31:40,730
machines have
887
00:31:41,269 --> 00:31:43,350
a SKU, like, hey, I'm deploying a b
888
00:31:43,350 --> 00:31:45,750
one VM over here, but then you also
889
00:31:45,750 --> 00:31:47,910
have things like number of instances of a
890
00:31:47,910 --> 00:31:49,509
VM that you want to deploy, and you
891
00:31:49,509 --> 00:31:51,269
might want to make that a parameter and
892
00:31:51,269 --> 00:31:52,330
dynamic within
893
00:31:52,654 --> 00:31:54,894
within your function. So rather than having a
894
00:31:54,894 --> 00:31:55,794
parameter of
895
00:31:56,174 --> 00:31:59,214
my VM one name dot SKU and my
896
00:31:59,214 --> 00:32:00,835
v one my VM
897
00:32:01,214 --> 00:32:02,835
one dot count,
898
00:32:03,534 --> 00:32:05,830
maybe you have more like a environment
899
00:32:06,210 --> 00:32:08,289
parameter or you have some other parameter that
900
00:32:08,289 --> 00:32:09,269
says, oh,
901
00:32:09,650 --> 00:32:12,150
when parameter is set to prod,
902
00:32:12,450 --> 00:32:13,190
just deploy
903
00:32:13,890 --> 00:32:16,450
d series VMs with this many instances. When
904
00:32:16,450 --> 00:32:18,734
it's set to dev, deploy b series
905
00:32:19,035 --> 00:32:21,674
with this many instances, or deploy this set
906
00:32:21,674 --> 00:32:23,934
of tags or these things over here. So
907
00:32:23,994 --> 00:32:26,654
it it walks you through all of those
908
00:32:26,714 --> 00:32:27,855
constructs as well
909
00:32:28,154 --> 00:32:30,690
in in, I think, a pretty clear manner.
910
00:32:30,690 --> 00:32:32,289
And like I said, that's when I I
911
00:32:32,289 --> 00:32:34,470
tend to find myself, like, going back to
912
00:32:34,609 --> 00:32:35,109
just
913
00:32:36,049 --> 00:32:37,269
the main optimization
914
00:32:37,650 --> 00:32:38,150
article
915
00:32:38,690 --> 00:32:39,589
that Microsoft
916
00:32:40,049 --> 00:32:42,369
has out there. So they have a best
917
00:32:42,369 --> 00:32:42,869
practices
918
00:32:43,250 --> 00:32:44,470
for bicep article.
919
00:32:45,055 --> 00:32:47,214
Between that one and then just revisiting that
920
00:32:47,214 --> 00:32:49,455
learn module occasionally, where I can, again, a
921
00:32:49,455 --> 00:32:51,394
b the starting and the ending template
922
00:32:51,775 --> 00:32:54,654
or the starting and ending bicep file, then
923
00:32:54,654 --> 00:32:56,575
that that generally gives me a good sense
924
00:32:56,575 --> 00:32:58,414
and enough to, like, oh, yeah, give my
925
00:32:58,414 --> 00:33:00,740
brain a kick, and let me remember where
926
00:33:00,740 --> 00:33:02,419
I wanted to be with that particular thing.
927
00:33:02,419 --> 00:33:04,339
Sounds good. I really should go spend some
928
00:33:04,339 --> 00:33:06,339
more time with biceps, Scott. Even though it
929
00:33:06,339 --> 00:33:08,900
is 4 o'clock and Friday, I still have
930
00:33:08,900 --> 00:33:11,159
3 more meetings today. Yuck.
931
00:33:11,565 --> 00:33:14,204
So we should call it a day, get
932
00:33:14,204 --> 00:33:15,184
ready for Ignite.
933
00:33:15,565 --> 00:33:17,325
We will probably we'll probably try to get
934
00:33:17,325 --> 00:33:18,865
some interviews, have some news,
935
00:33:19,325 --> 00:33:20,924
talk about some of the Ignite stuff here
936
00:33:20,924 --> 00:33:23,804
in the next couple of episodes. Yeah. I
937
00:33:23,804 --> 00:33:24,304
am
938
00:33:24,605 --> 00:33:27,130
looking forward to it. Got my plane tickets
939
00:33:27,130 --> 00:33:29,450
booked and everything. I'm all set. Perfect. We
940
00:33:29,450 --> 00:33:31,130
will see you at Ignite, Scott, and hopefully,
941
00:33:31,130 --> 00:33:34,009
we will see a few of, your listeners
942
00:33:34,009 --> 00:33:35,609
at Ignite as well here in a couple
943
00:33:35,609 --> 00:33:38,190
weeks. But for now, enjoy your weekend, and
944
00:33:38,250 --> 00:33:40,009
we will talk to you again later. Great.
945
00:33:40,009 --> 00:33:40,829
Thanks, Ben.
946
00:33:42,875 --> 00:33:45,115
If you enjoyed the podcast, go leave us
947
00:33:45,115 --> 00:33:47,355
a 5 star rating in iTunes. It helps
948
00:33:47,355 --> 00:33:49,035
to get the word out so more IT
949
00:33:49,035 --> 00:33:51,855
pros can learn about Office 365 and Azure.
950
00:33:52,394 --> 00:33:54,075
If you have any questions you want us
951
00:33:54,075 --> 00:33:56,234
to address on the show or feedback about
952
00:33:56,234 --> 00:33:58,609
the show, feel free to reach out via
953
00:33:58,609 --> 00:34:00,789
our website, Twitter, or Facebook.
954
00:34:01,089 --> 00:34:03,009
Thanks again for listening, and have a great
955
00:34:03,009 --> 00:34:03,509
day.