Skip to content

azurermCdnProfile

Manages a CDN Profile to create a collection of CDN Endpoints.

!> Be Aware: Azure is rolling out a breaking change on Friday 9th April 2021 which may cause issues with the CDN/FrontDoor resources. More information is available in this GitHub issue - however unfortunately this may necessitate a breaking change to the CDN and FrontDoor resources, more information will be posted in the GitHub issue as the necessary changes are identified.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
const azurermResourceGroupExample = new azurerm.resourceGroup.ResourceGroup(
  this,
  "example",
  {
    location: "West Europe",
    name: "example-resources",
  }
);
const azurermCdnProfileExample = new azurerm.cdnProfile.CdnProfile(
  this,
  "example_1",
  {
    location: azurermResourceGroupExample.location,
    name: "exampleCdnProfile",
    resource_group_name: azurermResourceGroupExample.name,
    sku: "Standard_Verizon",
    tags: {
      cost_center: "MSFT",
      environment: "Production",
    },
  }
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermCdnProfileExample.overrideLogicalId("example");

Argument Reference

The following arguments are supported:

  • name - (Required) Specifies the name of the CDN Profile. Changing this forces a new resource to be created.

  • resourceGroupName - (Required) The name of the resource group in which to create the CDN Profile. Changing this forces a new resource to be created.

  • location - (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

  • sku - (Required) The pricing related information of current CDN profile. Accepted values are standardAkamai, standardChinaCdn, standardMicrosoft, standardVerizon or premiumVerizon. Changing this forces a new resource to be created.

  • tags - (Optional) A mapping of tags to assign to the resource.

Attributes Reference

The following attributes are exported:

  • id - The ID of the CDN Profile.

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • create - (Defaults to 30 minutes) Used when creating the CDN Profile.
  • update - (Defaults to 30 minutes) Used when updating the CDN Profile.
  • read - (Defaults to 5 minutes) Used when retrieving the CDN Profile.
  • delete - (Defaults to 30 minutes) Used when deleting the CDN Profile.

Import

CDN Profiles can be imported using the resourceId, e.g.

terraform import azurerm_cdn_profile.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Cdn/profiles/myprofile1