You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> * Create a random value for the Azure resource group name using [random_pet](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet).
24
+
> * Create an Azure resource group using [azurerm_resource_group](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/resource_group).
25
+
> * Create a random value for the Front Door endpoint host name using [random_id](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/id).
26
+
> * Create a Front Door (classic) resource using - [azurerm_frontdoor](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/frontdoor).
22
27
23
28
## Prerequisites
24
29
@@ -28,29 +33,28 @@ The steps in this article were tested with the following Terraform and Terraform
28
33
29
34
## Implement the Terraform code
30
35
36
+
> [!NOTE]
37
+
> The sample code for this article is located in the [Azure Terraform GitHub repo](https://github.com/Azure/terraform/tree/master/quickstart/101-front-door-classic). You can view the log file containing the [test results from current and previous versions of Terraform](https://github.com/Azure/terraform/tree/master/quickstart/101-front-door-classic/TestRecord.md).
38
+
>
39
+
> See more [articles and sample code showing how to use Terraform to manage Azure resources](/azure/terraform)
40
+
31
41
1. Create a directory in which to test the sample Terraform code and make it the current directory.
32
42
33
43
1. Create a file named `providers.tf` and insert the following code:
@@ -66,37 +70,15 @@ The steps in this article were tested with the following Terraform and Terraform
66
70
67
71
## Verify the results
68
72
69
-
Use the Azure portal, Azure CLI, or Azure PowerShell to list the deployed resources in the resource group.
70
-
71
-
# [Portal](#tab/Portal)
72
-
73
-
1. Sign in to the [Azure portal](https://portal.azure.com).
74
-
75
-
1. Select **Resource groups** from the left pane.
76
-
77
-
1. Select the FrontDoor resource group.
73
+
1. Get the Front Door endpoint:
78
74
79
-
1. Select the Front Door you created and you'll be able to see the endpoint hostname. Copy the hostname and paste it on to the address bar of a browser. Press enter and your request will automatically get routed to the web app.
80
-
81
-
:::image type="content" source="./media/create-front-door-bicep/front-door-bicep-web-app-origin-success.png" alt-text="Screenshot of the message: Your web app is running and waiting for your content.":::
82
-
83
-
# [Azure CLI](#tab/CLI)
84
-
85
-
Run the following command:
86
-
87
-
```azurecli-interactive
88
-
az resource list --resource-group FrontDoor
89
-
```
90
-
91
-
# [PowerShell](#tab/PowerShell)
92
-
93
-
Run the following command:
75
+
```console
76
+
terraform output -raw frontDoorEndpointHostName
77
+
```
94
78
95
-
```azurepowershell-interactive
96
-
Get-AzResource -ResourceGroupName FrontDoor
97
-
```
79
+
1. Paste the endpoint into a browser.
98
80
99
-
---
81
+
:::image type="content" source="./media/quickstart-create-front-door-terraform/endpoint.png" alt-text="Screenshot of a successful connection to endpoint.":::
0 commit comments