Skip to content

Commit

Permalink
Updates to support easier policy deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
judyer28 committed Dec 17, 2024
1 parent f73d21d commit e3ee803
Show file tree
Hide file tree
Showing 612 changed files with 207,664 additions and 7 deletions.
32 changes: 25 additions & 7 deletions docs/layouts/partials/templates/template-tabs.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
{{ $alert_name := printf "%s_%s" $alert_name .alert.guid }}
{{ $filename := printf "%s.json" $alert_name | printf "%s"}}
{{ $file := path.Join "services" $category $type "templates/arm" $filename }}
{{ $file2 := path.Join "services" $category $type "templates/policy-arm" $filename }}
<div class="gdoc-tabs">
<input
type="radio"
Expand All @@ -12,7 +13,7 @@
id="{{ anchorize .alert.name }}-0"
checked="checked"
/>
<label for="{{ anchorize .alert.name }}-0" class="gdoc-tabs__label">Deploy</label>
<label for="{{ anchorize .alert.name }}-0" class="gdoc-tabs__label">Deploy Alert</label>
<div class="gdoc-markdown--nested gdoc-tabs__content">
<p>
<a href="https://portal.azure.com/#create/Microsoft.Template/uri/{{ absURL $file }}" target="_blank">
Expand All @@ -29,7 +30,24 @@
name="{{ anchorize .alert.name }}"
id="{{ anchorize .alert.name }}-1"
/>
<label for="{{ anchorize .alert.name }}-1" class="gdoc-tabs__label">
<label for="{{ anchorize .alert.name }}-1" class="gdoc-tabs__label">Deploy Policy</label>
<div class="gdoc-markdown--nested gdoc-tabs__content">
<p>
<a href="https://portal.azure.com/#create/Microsoft.Template/uri/{{ absURL $file2 }}" target="_blank">
<img src="https://aka.ms/deploytoazurebutton"/>
</a>
<a href="https://portal.azure.us/#create/Microsoft.Template/uri/{{ absURL $file2 }}" target="_blank">
<img src="https://aka.ms/deploytoazuregovbutton"/>
</a>
</p>
</div>
<input
type="radio"
class="gdoc-tabs__control hidden"
name="{{ anchorize .alert.name }}"
id="{{ anchorize .alert.name }}-2"
/>
<label for="{{ anchorize .alert.name }}-2" class="gdoc-tabs__label">
ARM
</label>
<div class="gdoc-markdown--nested gdoc-tabs__content">
Expand All @@ -40,9 +58,9 @@
type="radio"
class="gdoc-tabs__control hidden"
name="{{ anchorize .alert.name }}"
id="{{ anchorize .alert.name }}-2"
id="{{ anchorize .alert.name }}-3"
/>
<label for="{{ anchorize .alert.name }}-2" class="gdoc-tabs__label">
<label for="{{ anchorize .alert.name }}-3" class="gdoc-tabs__label">
Bicep
</label>
<div class="gdoc-markdown--nested gdoc-tabs__content">
Expand All @@ -55,15 +73,15 @@
type="radio"
class="gdoc-tabs__control hidden"
name="{{ anchorize .alert.name }}"
id="{{ anchorize .alert.name }}-3"
id="{{ anchorize .alert.name }}-4"
/>
<label for="{{ anchorize .alert.name }}-3" class="gdoc-tabs__label">
<label for="{{ anchorize .alert.name }}-4" class="gdoc-tabs__label">
Policy
</label>
<div class="gdoc-markdown--nested gdoc-tabs__content">
{{ $filename := printf "%s.json" $alert_name | printf "%s"}}
{{ $file := path.Join "services" $category $type "templates/policy" $filename }}
{{ $data := readFile $file }}
{{ $data := readFile $file | replaceRE "\\[\\[" "[" }}
{{ highlight $data "json" }}
</div>
</div>
Loading

0 comments on commit e3ee803

Please sign in to comment.