Skip to content

Files

Latest commit

7e303ca · Mar 18, 2022

History

History
124 lines (79 loc) · 4.6 KB

create-profile-endpoint-template.md

File metadata and controls

124 lines (79 loc) · 4.6 KB
title titleSuffix description services author manager ms.service ms.tgt_pltfrm ms.topic ms.custom ms.date ms.author
Quickstart: Create a profile and endpoint - Resource Manager template
Azure Content Delivery Network
In this quickstart, learn how to create an Azure Content Delivery Network profile and endpoint a Resource Manager template
cdn
duongau
KumudD
azure-cdn
na
quickstart
subject-armqs, devx-track-azurepowershell, mode-arm
05/10/2021
duau

Quickstart: Create an Azure CDN profile and endpoint - ARM template

Get started with Azure Content Delivery Network (CDN) by using an Azure Resource Manager template (ARM template). The template deploys a profile and an endpoint.

[!INCLUDE About Azure Resource Manager]

If your environment meets the prerequisites and you're familiar with using ARM templates, select the Deploy to Azure button. The template will open in the Azure portal.

Deploy to Azure

Prerequisites

[!INCLUDE quickstarts-free-trial-note]

Review the template

The template used in this quickstart is from Azure Quickstart Templates.

This template is configured to create a:

  • Profile
  • Endpoint

:::code language="json" source="~/quickstart-templates/quickstarts/microsoft.cdn/cdn-with-custom-origin/azuredeploy.json":::

One Azure resource is defined in the template:

Deploy the template

Azure CLI

read -p "Enter the location (i.e. eastus): " location
resourceGroupName="myResourceGroupCDN"
templateUri="https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/quickstarts/microsoft.cdn/cdn-with-custom-origin/azuredeploy.json"

az group create \
--name $resourceGroupName \
--location $location

az deployment group create \
--resource-group $resourceGroupName \
--template-uri  $templateUri

PowerShell

$location = Read-Host -Prompt "Enter the location (i.e. eastus)"
$templateUri = "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/quickstarts/microsoft.cdn/cdn-with-custom-origin/azuredeploy.json"

$resourceGroupName = "myResourceGroupCDN"

New-AzResourceGroup -Name $resourceGroupName -Location $location
New-AzResourceGroupDeployment -ResourceGroupName $resourceGroupName -TemplateUri $templateUri

Portal

Deploy to Azure

Review deployed resources

  1. Sign in to the Azure portal.

  2. Select Resource groups from the left pane.

  3. Select the resource group that you created in the previous section. The default resource group name is myResourceGroupCDN

  4. Verify the following resources were created in the resource group:

    :::image type="content" source="media/create-profile-endpoint-template/cdn-profile-template-rg.png" alt-text="Azure CDN resource group" border="true":::

Clean up resources

Azure CLI

When no longer needed, you can use the az group delete command to remove the resource group and all resources contained within.

  az group delete \
    --name myResourceGroupCDN

PowerShell

When no longer needed, you can use the Remove-AzResourceGroup command to remove the resource group and all resources contained within.

Remove-AzResourceGroup -Name myResourceGroupCDN

Portal

When no longer needed, delete the resource group, CDN profile, and all related resources. Select the resource group myResourceGroupCDN that contains the CDN profile and endpoint, and then select Delete.

Next steps

In this quickstart, you created a:

  • CDN Profile
  • Endpoint

To learn more about Azure CDN and Azure Resource Manager, continue to the articles below.

[!div class="nextstepaction"] Tutorial: Use CDN to serve static content from a web app