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
Copy file name to clipboardExpand all lines: articles/cdn/create-profile-endpoint-terraform.md
+37-10Lines changed: 37 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,11 @@
1
1
---
2
2
title: 'Quickstart: Create an Azure CDN profile and endpoint using Terraform'
3
+
titleSuffix: Azure Content Delivery Network
3
4
description: 'In this article, you create an Azure CDN profile and endpoint using Terraform'
4
5
services: cdn
5
6
ms.service: azure-cdn
6
7
ms.topic: quickstart
7
-
ms.date: 3/28/2023
8
+
ms.date: 4/12/2023
8
9
ms.custom: devx-track-terraform
9
10
author: TomArcherMsft
10
11
ms.author: tarcher
@@ -22,7 +23,7 @@ In this article, you learn how to:
22
23
> [!div class="checklist"]
23
24
> * Create a random pet name for the Azure resource group name using [random_pet](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet)
24
25
> * 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 string using [random_string](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string)
26
+
> * Create a random string for the CDN endpoint name using [random_string](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string)
26
27
> * Create an Azure CDN profile using [azurerm_cdn_profile](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/cdn_profile)
27
28
> * Create an Azure CDN endpoint using [azurerm_cdn_endpoint](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/cdn_endpoint)
28
29
@@ -35,27 +36,27 @@ In this article, you learn how to:
35
36
## Implement the Terraform code
36
37
37
38
> [!NOTE]
38
-
> The sample code for this article is located in the [Azure Terraform GitHub repo](https://github.com/Azure/terraform/tree/master/quickstart/101-azure-cdn). You can view the log file containing the [test results from current and previous versions of Terraform](https://github.com/Azure/terraform/blob/master/quickstart/101-azure-cdn/TestRecord.md).
39
+
> The sample code for this article is located in the [Azure Terraform GitHub repo](https://github.com/Azure/terraform/tree/master/quickstart/101-cdn-with-custom-origin). You can view the log file containing the [test results from current and previous versions of Terraform](https://github.com/Azure/terraform/blob/master/quickstart/101-cdn-with-custom-origin/TestRecord.md).
39
40
>
40
41
> See more [articles and sample code showing how to use Terraform to manage Azure resources](/azure/terraform)
41
42
42
43
1. Create a directory in which to test and run the sample Terraform code and make it the current directory.
43
44
44
45
1. Create a file named `main.tf` and insert the following code:
@@ -94,13 +95,39 @@ In this article, you learn how to:
94
95
1. Run [az cdn custom-domain show](/cli/azure/cdn/custom-domain#az-cdn-custom-domain-show) to show details of the custom domain you created in this article.
95
96
96
97
```azurecli
97
-
az cdn endpoint show --name $cdn_endpoint_endpoint_name \
98
+
az cdn endpoint show --resource-group $resource_group_name \
98
99
--profile-name $cdn_profile_name \
99
-
--resource-group $resource_group_name
100
-
```
100
+
--name $cdn_endpoint_endpoint_name
101
+
```
101
102
102
103
#### [Azure PowerShell](#tab/azure-powershell)
103
104
105
+
1. Get the Azure resource group name in which the Azure CDN profile and endpoint were created.
0 commit comments