SlideShare a Scribd company logo
Bicep 0.5pre
第33回Tokyo Jazug Night
byTakekazuOmi(@Baleen.Studio)
2021/11/25 v1.0.0
第33回 Tokyo Jazug Night
Takekazu Omi @Baleen.Studio 1
自己紹介
近江武一@takekazuomi
所属JAZUG、baleen.studio(仲間を募集中)
GitHub
AzureContainerAppsのサンプルプロジェクト
bicepのオレオレdevconainer
Blog kyrt.inからzenn.devへ移動(したい)
ARM tempateDSL、Bicep を使おう(1)
ARM tempateDSL、Bicep を使おう(2)
第33回 Tokyo Jazug Night
Takekazu Omi @Baleen.Studio 2
今日の話
今日は、Bicep0.4以降に追加された機能の話
をします
0.5の話をする予定だったのですが、まだ出てないので、、、、
第33回 Tokyo Jazug Night
Takekazu Omi @Baleen.Studio 3
Bicep の短い紹介
公式ドキュメント
https://docs.microsoft.com/.../bicep/overview
MS Learn、Bicep 概要
https://docs.microsoft.com/.../introduction-to-
infrastructure-as-code-using-bicep/
ソースコード、GitHub
https://github.com/Azure/bicep
第33回 Tokyo Jazug Night
Takekazu Omi @Baleen.Studio 4
0.4以降のリリース履歴
2021/06/02 v0.4.1 //Build 2021
06/05 0.4.63 Bug fix,ドキュメント改善
07/16 0.4.412 jsonサポート改善
07/22 0.4.451 Bug fix,ドキュメント改善
08/11 0.4.613 VSCode改善
10/16 0.4.1008 privateモジュール対応
11/23 0.4.1090 ・・・mainbranch、未リリース
第33回 Tokyo Jazug Night
Takekazu Omi @Baleen.Studio 5
2021/06/05
0.4.63
Bug fix,ドキュメント改善
第33回 Tokyo Jazug Night
Takekazu Omi @Baleen.Studio 6
2021/7/16
0.4.412
第33回 Tokyo Jazug Night
Takekazu Omi @Baleen.Studio 7
listmethodcall
resource sa 'Microsoft.Storage/storageAccounts@2021-06-01' = {
name: 'demosa${uniqueString(resourceGroup().id)}'
...
}
output key string = sa.listKeys().keys[0].value
list*の関数をリソースのメソッドとして記載
旧: listKeys(sa.id, sa.apiVersion).keys[0].value
第33回 Tokyo Jazug Night
Takekazu Omi @Baleen.Studio 8
JSONliteral
var jsonVar = json('{"hello":"world"}')
var foo = jsonVar.hello
var jsonVar2 = json(loadTextContent('./jsonVar.json'))
var boo = jsonVar2.hello
リテラルでjsonでオブジェクトを初期化、補完が効く
loadTextContent と組み合わせて別ファイルにjsonを置ける
注: loadTextContent はコンパイル時にインライン展開される
第33回 Tokyo Jazug Night
Takekazu Omi @Baleen.Studio 9
jsontemplatesasmodules
module sa './storage.json' = {
name: 'sa'
params: {
name: 'jzugdemo01'
}
}
storage.jsonは、ARM Template
拡張子は、 json , jsonc , arm のいずれか
第33回 Tokyo Jazug Night
Takekazu Omi @Baleen.Studio 10
ファイルをbase64文字列で読む
var binary = loadFileAsBase64('base64.data')
VMのosProfile.customDataや、KeyVaultの証明書などbase64
で受け取る場合に利用
例:(間に合えば)
公式:loadFileAsBase64
第33回 Tokyo Jazug Night
Takekazu Omi @Baleen.Studio 11
2021/8/11
0.4.613
VSCode周りの機能強化
第33回 Tokyo Jazug Night
Takekazu Omi @Baleen.Studio 12
2021/10/16
0.4.1008
第33回 Tokyo Jazug Night
Takekazu Omi @Baleen.Studio 13
PrivateModuleRegistry
ドキュメント:
Privateregistryの作成
Registry内のモジュールの参照
Publishとrestoreコマンド
bicepconfig.json でのregistryaliasesの定義
Note:publicregistryは、Bicep v0.5 (ETAearlyNovember)の
予定
第33回 Tokyo Jazug Night
Takekazu Omi @Baleen.Studio 14
PrivateModule
$ bicep publish storage.bicep --target br:acrjazug01wv7qxzdehff2c.azurecr.io/bicep/modules/storage:v1
module sa 'br:acrjazug01wv7qxzdehff2c.azurecr.io/bicep/modules/storage:v1' = {
name: 'sa'
params: {
prefix: 'sajzugdemo01'
}
}
brが、bicep moduleで、tsでTemplateSpecを指定
acrのフルパスの部分は、aliasを切れる
第33回 Tokyo Jazug Night
Takekazu Omi @Baleen.Studio 15
modulealias:bicepconfig.json
"moduleAliases": {
"br": {
"modules": {
"registry": "acrjazug01wv7qxzdehff2c.azurecr.io",
"modulePath": "bicep/modules"
...
module sa 'br/modules:storage:v1' = {
...
br/modules: コロンの前にaliasを書く
第33回 Tokyo Jazug Night
Takekazu Omi @Baleen.Studio 16
TemplateSpecmodule
Templatespecsをモジュールのソースにできる
例:moduletsDeploy
ts:<<SUB-GUID>>/<<RG-NAME>>/<<TEMPLATE-SPEC-NAME:<<VERSION>>
= {...}
例:alias:moduletsDeploy
ts/myAlias:<<TEMPLATE-SPEC-NAME>>:<<VERSION>> = {...}
第33回 Tokyo Jazug Night
Takekazu Omi @Baleen.Studio 17
items()辞書から配列に変換
var keys = {
key1: {
foo: true
woo: 100
}
key2: {
foo: false
woo: 200
...
var r = [for k in items(keys): {
key: k.key
foo: k.value.foo
woo: k.value.woo
}]
第33回 Tokyo Jazug Night
Takekazu Omi @Baleen.Studio 18
items()結果
"value": [
{
"foo": true,
"key": "key1",
"woo": 100
},
{
"foo": false,
"key": "key2",
"woo": 200
}
]
第33回 Tokyo Jazug Night
Takekazu Omi @Baleen.Studio 19
adminUsernameのリテラル指定
Linterのルール
第33回 Tokyo Jazug Night
Takekazu Omi @Baleen.Studio 20
2021/11/23
その後のPR
その、いくつかをピックアップ
第33回 Tokyo Jazug Night
Takekazu Omi @Baleen.Studio 21
PRを見る
$ gh pr list -s merged --search "merged:2021-10-16..2021-11-30 base:main sort:updated-desc"
Showing 30 of 82 pull requests in Azure/bicep that match your search
#5203 database, security, storage visualizer icons wedoazure:main
#4925 linter: use-protectedsettings-for-commandtoexecute-secrets sw/protected-settings-rule
#5189 Removed empty functions property from being emitted. davidcho23:main
#5198 Updated to c# 10 majastrz/net6-cleanup
#4693 Bump monaco-editor-webpack-plugin from 4.1.2 to 4.2.0 in /src/playground dependabot/npm_and_yarn/src/playground/monaco-editor-webpack-plugin-...
#4936 Updated to .net 6 majastrz/net6
#5188 Flow declared type information to function arguments ant/5187
#5182 fix: correct "as" typo to "at" johnnyreilly:patch-1
#5145 Implement type completions & validation for resource list functions ant/exp/list_funcs
#5168 Updated Compute and Web visualizer icons wedoazure:main
#5175 Fix KeyNotFoundException when rebuilding source files with external m... shenglol/fix-#5152
#5107 Add ability to suppress next line diagnostics inline DisableDiagnosticInline
#5174 Don't parse DateTime when loading JSON templates shenglol/disable-datetime-handling
#5170 Acquire file lock before writing template spec modules shenglol/fix-#5159
#5158 Visualizer improvements shenglol/visualizer-improvements
#5075 Improve `string` + `string` error message tsunkaraneni/stringadditionerror
#4945 "Insert Resource" command implementation ant/feat/import_resource
#5143 Fix inline dependency check for resource access syntaxes shenglol/fix-issue-#4850
#5130 updated Networking visualizer icons wedoazure:main
#5140 Remove "preview" flag from VSCode extension anthony-c-martin-patch-1
#5139 Updated ARM and ACR SDKs majastrz/update-acr-sdk
#5137 Add other useful CLI utils to devcontainer ant/devcontainer
#5128 Fix highlight.js finding keywords in strings ant/issue5127
第33回 Tokyo Jazug Night
Takekazu Omi @Baleen.Studio 22
PR続き
#5097 Add live tests for module aliases shenglol/module-alias-live-tests
#5019 Extensible resource code generation ant/ext_codegen
#5066 Provide better error info on getting repro root failure sw/baseinehelper-err
#4838 New linter rule no-unnecessary-dependson sw/dependson4
#5058 Workaround for NBGV OSX build issue anthony-c-martin-patch-1
#5049 Bump esbuild-loader module ant/bump_esbuild_loader
#5039 Migrate brew to https://github.com/Azure/homebrew-bicep ant/migrate_brew
.NET 6、C# 10になってる。
多すぎるので、機能のものだけを選択したら2個に、、、
第33回 Tokyo Jazug Night
Takekazu Omi @Baleen.Studio 23
#4925linterシークレットの利用
UseprotectedSettingsforcommandToExecutesecrets
第33回 Tokyo Jazug Night
Takekazu Omi @Baleen.Studio 24
#4925linterシークレットの利用(2)
protectedSettings: {
commandToExecute: 'powershell -ExecutionPolicy Unrestricted -File ${firstFileName} ${arguments}'
}
protectedSettingsに書くと、仮想マシンの中だけでdecrypted
できる形式で暗号化されて送られる
参照:UsetheAzureCustom Script ExtensionVersion2 with
Linux virtualmachines
第33回 Tokyo Jazug Night
Takekazu Omi @Baleen.Studio 25
#4945"InsertResource"command
リソースIDを指定して、 bicep resource を作るやつ
Demo(時間があれば)
第33回 Tokyo Jazug Night
Takekazu Omi @Baleen.Studio 26
おまけ
Visualizerのアイコンがリッチになった。
第33回 Tokyo Jazug Night
Takekazu Omi @Baleen.Studio 27
今回のコンテンツ
GitHub 20211125-jazug33-bicep
Slideshare20211125-jazug33-bicep
Powerd byMarp。ありがとうございました
第33回 Tokyo Jazug Night
Takekazu Omi @Baleen.Studio 28
終
第33回 Tokyo Jazug Night
Takekazu Omi @Baleen.Studio 29

More Related Content

PDF
jazug34 Container Apps Key Vault
PDF
bicep 紹介
PDF
Bicep + VS Code で楽々Azure Deploy
PDF
Unity C#と.NET Core(MagicOnion) C# そしてKotlinによるハーモニー
PDF
Multipeer connectivityを使った 動画のリアルタイム端末間共有
PDF
Unityによるリアルタイム通信とMagicOnionによるC#大統一理論の実現
PDF
Githubを使って簡単に helm repoを公開してみよう
PDF
「黒騎士と白の魔王」gRPCによるHTTP/2 - API, Streamingの実践
jazug34 Container Apps Key Vault
bicep 紹介
Bicep + VS Code で楽々Azure Deploy
Unity C#と.NET Core(MagicOnion) C# そしてKotlinによるハーモニー
Multipeer connectivityを使った 動画のリアルタイム端末間共有
Unityによるリアルタイム通信とMagicOnionによるC#大統一理論の実現
Githubを使って簡単に helm repoを公開してみよう
「黒騎士と白の魔王」gRPCによるHTTP/2 - API, Streamingの実践

What's hot (20)

PDF
True Cloud Native Batch Workflow for .NET with MicroBatchFramework
PDF
Building the Game Server both API and Realtime via c#
PDF
ライブラリ作成のすゝめ - 事例から見る個人OSS開発の効能
PDF
A quick tour of the Cysharp OSS
PPTX
C#で速度を極めるいろは
PDF
The Usage and Patterns of MagicOnion
PDF
NextGen Server/Client Architecture - gRPC + Unity + C#
PDF
MagicOnion~C#でゲームサーバを開発しよう~
PDF
Implements OpenTelemetry Collector in DotNet
PDF
ZeroFormatterに見るC#で最速のシリアライザを作成する100億の方法
PDF
対話AI on Kubernetes
PPTX
Kubernetes Meetup Tokyo #8 Self-hosted Kubernetes を調べてみた
PPTX
Kubernetes etc.. & rancher 2.0 technical preview
PPTX
C#エンジニアのためのdocker kubernetesハンズオン
PDF
The History of Reactive Extensions
PDF
introducing vue-wait-component
PDF
hooks riverpod + state notifier + freezed でのドメイン駆動設計
PPTX
Knative Lambda Runtimeを試してみた
PPTX
最速C# 7.x
PDF
OpenShift 3で、DockerのPaaSを作る話
True Cloud Native Batch Workflow for .NET with MicroBatchFramework
Building the Game Server both API and Realtime via c#
ライブラリ作成のすゝめ - 事例から見る個人OSS開発の効能
A quick tour of the Cysharp OSS
C#で速度を極めるいろは
The Usage and Patterns of MagicOnion
NextGen Server/Client Architecture - gRPC + Unity + C#
MagicOnion~C#でゲームサーバを開発しよう~
Implements OpenTelemetry Collector in DotNet
ZeroFormatterに見るC#で最速のシリアライザを作成する100億の方法
対話AI on Kubernetes
Kubernetes Meetup Tokyo #8 Self-hosted Kubernetes を調べてみた
Kubernetes etc.. & rancher 2.0 technical preview
C#エンジニアのためのdocker kubernetesハンズオン
The History of Reactive Extensions
introducing vue-wait-component
hooks riverpod + state notifier + freezed でのドメイン駆動設計
Knative Lambda Runtimeを試してみた
最速C# 7.x
OpenShift 3で、DockerのPaaSを作る話
Ad

Similar to bicep 0.5 pre (7)

PDF
Scala2.8への移行
PDF
Scala2.8への移行
PPTX
メガ Unity ユーザーミートアップ 2012
PDF
//build 2021 bicep 0.4
PDF
俺的 Build 2021 Update まとめ
PDF
AzureDevOpsで作るHoloLensアプリCI環境
PDF
観たいセッションがかぶった!なんて心配ご無用。今年は、興味の赴くままにあれもこれも♪
Scala2.8への移行
Scala2.8への移行
メガ Unity ユーザーミートアップ 2012
//build 2021 bicep 0.4
俺的 Build 2021 Update まとめ
AzureDevOpsで作るHoloLensアプリCI環境
観たいセッションがかぶった!なんて心配ご無用。今年は、興味の赴くままにあれもこれも♪
Ad

More from Takekazu Omi (20)

PDF
Bicep 入門 MySQL編
PDF
//Build 2021 FASTER 紹介
PDF
bicep dev container
PDF
Introduction of Azure Docker Integration
PPTX
Cosmos DB Consistency Levels and Introduction of TLA+
PPTX
20180421 Azure Architecture Cloud Design Patterns
PPTX
Azure Application Insights とか
PPTX
第8回 Tokyo Jazug Night Ignite 2017 落穂拾い Storage編
PDF
life with posh
PPTX
Cosmos DB 入門 multi model multi API編
PPTX
Global Azure Bootcamp 2017 DocumentDB Deep Dive
PPTX
Azure Storage Partition Internals
PPTX
Azure Service Fabric Cluster の作成
PPTX
Azure Service Fabric Actor
PPTX
祝GA、 Service Fabric 概要
PPTX
Azure Fabric Service Reliable Collection
PPTX
Servcie Fabric and Cloud Design Pattern
PPTX
Service Fabric での高密度配置
PPTX
Introduction to Azure Service Fabric
PPTX
Azure Service Fabric 紹介
Bicep 入門 MySQL編
//Build 2021 FASTER 紹介
bicep dev container
Introduction of Azure Docker Integration
Cosmos DB Consistency Levels and Introduction of TLA+
20180421 Azure Architecture Cloud Design Patterns
Azure Application Insights とか
第8回 Tokyo Jazug Night Ignite 2017 落穂拾い Storage編
life with posh
Cosmos DB 入門 multi model multi API編
Global Azure Bootcamp 2017 DocumentDB Deep Dive
Azure Storage Partition Internals
Azure Service Fabric Cluster の作成
Azure Service Fabric Actor
祝GA、 Service Fabric 概要
Azure Fabric Service Reliable Collection
Servcie Fabric and Cloud Design Pattern
Service Fabric での高密度配置
Introduction to Azure Service Fabric
Azure Service Fabric 紹介

bicep 0.5 pre