azurerm_cdn_endpoint

A CDN Endpoint is the entity within a CDN Profile containing configuration information regarding caching behaviours and origins. The CDN Endpoint is exposed using the URL format <endpointname>.azureedge.net.

Example Usage

resource "azurerm_resource_group" "example" {
  name     = "example-resources"
  location = "West Europe"
}

resource "azurerm_cdn_profile" "example" {
  name                = "example-cdn"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name
  sku                 = "Standard_Verizon"
}

resource "azurerm_cdn_endpoint" "example" {
  name                = "example"
  profile_name        = azurerm_cdn_profile.example.name
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name

  origin {
    name      = "example"
    host_name = "www.contoso.com"
  }
}

Arguments Reference

The following arguments are supported:


The origin block supports:


The geo_filter block supports:


A global_delivery_rule block supports the following:


A delivery_rule block supports the following:


A cache_expiration_action block supports the following:


A cache_key_query_string_action block supports the following:


A modify_request_header_action block supports the following:


A modify_response_header_action block supports the following:


A url_redirect_action block supports the following:


A url_rewrite_action block supports the following:


A cookies_condition block supports the following:


A device_condition block supports the following:


A http_version_condition block supports the following:


A post_arg_condition block supports the following:


A query_string_condition block supports the following:


A remote_address_condition block supports the following:


A request_body_condition block supports the following:


A request_header_condition block supports the following:


A request_method_condition block supports the following:


A request_scheme_condition block supports the following:


A request_uri_condition block supports the following:


A url_file_extension_condition block supports the following:


A url_file_name_condition block supports the following:


A url_path_condition block supports the following:


Attributes Reference

In addition to the Arguments listed above - the following Attributes are exported:

Timeouts

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

Import

CDN Endpoints can be imported using the resource id, e.g.

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