Skip to content

Commit a5369b1

Browse files
managed rules + SS links
1 parent 9ae54e0 commit a5369b1

File tree

1 file changed

+31
-3
lines changed

1 file changed

+31
-3
lines changed

articles/frontdoor/standard-premium/create-front-door-cli.md

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Create an Azure Front Door Premium with the Azure CLI
3-
description: Learn how to create an Azure Front Door Premium with Azure CLI. Use Azure Front Door to deliver content to your global user base and protect your web apps against vulnerabilities.
2+
title: Create an Azure Front Door Standard/Premium with the Azure CLI
3+
description: Learn how to create an Azure Front Door Standard/Premium with Azure CLI. Use Azure Front Door to deliver content to your global user base and protect your web apps against vulnerabilities.
44
ms.topic: sample
55
author: duau
66
ms.author: duau
@@ -34,6 +34,9 @@ az group create --name myRGFD --location centralus
3434

3535
Run [az afd profile create](/cli/azure/afd/profile#az-afd-profile-create) to create an Azure Front Door profile.
3636

37+
> [!NOTE]
38+
> If you want to deploy Azure Front Door Standard instead of Premium substitute the value of the sku parameter with Standard_AzureFrontDoor. You won't be able to deploy Managed Rules with WAF Policy, if you choose Standard SKU. For detailed comparison, view [Azure Front Door tier comparison](./tier-comparison.md).
39+
3740
```azurecli
3841
az afd profile create \
3942
--profile-name contosoafd \
@@ -169,6 +172,9 @@ az afd route create \
169172
### Create a WAF policy
170173

171174
Run [az network front-door waf-policy create](/cli/azure/network/front-door/waf-policy#az-network-front-door-waf-policy-create) to create a new WAF policy for your Front Door. This example creates a policy that is enabled and in prevention mode.
175+
176+
> [!NOTE]
177+
> Managed rules will only work with Front Door Premium SKU. You can opt for Standard SKU below to use custom rules.
172178
173179
```azurecli
174180
az network front-door waf-policy create \
@@ -182,6 +188,25 @@ az network front-door waf-policy create \
182188
> [!NOTE]
183189
> If you select `Detection` mode, your WAF doesn't block any requests.
184190
191+
### Assign Managed Rules to the WAF Policy
192+
Run [az network front-door waf-policy managed-rules add](/cli/azure/network/front-door/waf-policy/managed-rules#az-network-front-door-waf-policy-managed-rules-add) to add Managed Rules to your WAF Policy. This example adds Microsoft_DefaultRuleSet_1.2 and Microsoft_BotManagerRuleSet_1.0 to your policy.
193+
194+
195+
```azurecli
196+
az network front-door waf-policy managed-rules add \
197+
--policy-name contosoWAF \
198+
--resource-group myRGFD \
199+
--type Microsoft_DefaultRuleSet \
200+
--version 1.2
201+
```
202+
203+
```azurecli
204+
az network front-door waf-policy managed-rules add \
205+
--policy-name contosoWAF \
206+
--resource-group myRGFD \
207+
--type Microsoft_BotManagerRuleSet \
208+
--version 1.0
209+
```
185210
### Create the security policy
186211

187212
Run [az afd security-policy create](/cli/azure/afd/security-policy#az-afd-security-policy-create) to apply your WAF policy to the endpoint's default domain.
@@ -210,7 +235,7 @@ az afd endpoint show --resource-group myRGFD --profile-name contosoafd --endpoin
210235
```
211236
In a browser, go to the endpoint hostname: `contosofrontend-<hash>.z01.azurefd.net`. Your request will automatically get routed to the least latent Web App in the origin group.
212237

213-
238+
:::image type="content" source="../media/create-front-door-portal/front-door-web-app-origin-success.png" alt-text="Your web app is running and waiting for your content":::
214239

215240
To test instant global failover, we'll use the following steps:
216241

@@ -234,6 +259,9 @@ az webapp stop --name WebAppContoso-02 --resource-group myRGFD
234259

235260
6. Refresh your browser. This time, you should see an error message.
236261

262+
:::image type="content" source="../media/create-front-door-portal/web-app-stopped-message.png" alt-text="Both instances of the web app stopped":::
263+
264+
237265
7. Restart one of the Web Apps by running [az webapp start](/cli/azure/webapp#az-webapp-start&preserve-view=true). Refresh your browser and the page will go back to normal.
238266

239267
```azurecli

0 commit comments

Comments
 (0)