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).
26
+
> * Create an Azure resource group using [azurerm_resource_group](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/resource_group).
27
+
> * Create a random value for the Front Door endpoint resource name and App Service app name using [random_id](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/id).
28
+
> * Create a Front Door profile using [azurerm_cdn_frontdoor_profile](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/cdn_frontdoor_profile).
29
+
> * Create a Front Door endpoint using [azurerm_cdn_frontdoor_endpoint](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/cdn_frontdoor_endpoint).
30
+
> * Create a Front Door origin group using [azurerm_cdn_frontdoor_origin_group](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/cdn_frontdoor_origin_group)
31
+
> * Create a Front Door origin, which refers to the App Service app, using [azurerm_cdn_frontdoor_origin](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/cdn_frontdoor_origin).
32
+
> * Create a Front Door route using [azurerm_cdn_frontdoor_route](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/cdn_frontdoor_route).
33
+
> * Create an App Service plan using [azurerm_service_plan](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/service_plan).
34
+
> * Create an App Service app using [azurerm_windows_web_app](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/windows_web_app).
-[Install and configure Terraform](/azure/developer/terraform/quickstart-configure)
30
-
- IP address or FQDN of a website or web application.
31
39
32
40
## Implement the Terraform code
33
41
42
+
> [!NOTE]
43
+
> 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-standard-premium). 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-standard-premium/TestRecord.md).
44
+
>
45
+
> See more [articles and sample code showing how to use Terraform to manage Azure resources](/azure/terraform)
46
+
34
47
1. Create a directory in which to test the sample Terraform code and make it the current directory.
35
48
36
49
1. Create a file named `providers.tf` and insert the following code:
@@ -71,37 +80,15 @@ The steps in this article were tested with the following Terraform and Terraform
71
80
72
81
## Verify the results
73
82
74
-
Use the Azure portal, Azure CLI, or Azure PowerShell to list the deployed resources in the resource group.
75
-
76
-
# [Portal](#tab/Portal)
77
-
78
-
1. Sign in to the [Azure portal](https://portal.azure.com).
79
-
80
-
1. Select **Resource groups** from the left pane.
81
-
82
-
1. Select the FrontDoor resource group.
83
+
1. Get the Front Door endpoint:
83
84
84
-
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.
85
+
```console
86
+
terraform output -raw frontDoorEndpointHostName
87
+
```
85
88
86
-
:::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.":::
89
+
1. Paste the endpoint into a browser.
87
90
88
-
# [Azure CLI](#tab/CLI)
89
-
90
-
Run the following command:
91
-
92
-
```azurecli-interactive
93
-
az resource list --resource-group FrontDoor
94
-
```
95
-
96
-
# [PowerShell](#tab/PowerShell)
97
-
98
-
Run the following command:
99
-
100
-
```azurepowershell-interactive
101
-
Get-AzResource -ResourceGroupName FrontDoor
102
-
```
103
-
104
-
---
91
+
:::image type="content" source="./media/create-front-door-terraform/endpoint.png" alt-text="Screenshot of a successful connection to endpoint.":::
0 commit comments