github.com/vtorhonen/terraform@v0.9.0-beta2.0.20170307220345-5d894e4ffda7/website/source/docs/providers/azurerm/r/cdn_endpoint.html.markdown (about) 1 --- 2 layout: "azurerm" 3 page_title: "Azure Resource Manager: azurerm_cdn_endpoint" 4 sidebar_current: "docs-azurerm-resource-cdn-endpoint" 5 description: |- 6 Create a CDN Endpoint entity. 7 --- 8 9 # azurerm\_cdn\_endpoint 10 11 A CDN Endpoint is the entity within a CDN Profile containing configuration information regarding caching behaviors and origins. The CDN Endpoint is exposed using the URL format <endpointname>.azureedge.net by default, but custom domains can also be created. 12 13 ## Example Usage 14 15 ``` 16 resource "azurerm_resource_group" "test" { 17 name = "acceptanceTestResourceGroup1" 18 location = "West US" 19 } 20 21 resource "azurerm_cdn_profile" "test" { 22 name = "acceptanceTestCdnProfile1" 23 location = "West US" 24 resource_group_name = "${azurerm_resource_group.test.name}" 25 sku = "Standard" 26 } 27 28 resource "azurerm_cdn_endpoint" "test" { 29 name = "acceptanceTestCdnEndpoint1" 30 profile_name = "${azurerm_cdn_profile.test.name}" 31 location = "West US" 32 resource_group_name = "${azurerm_resource_group.test.name}" 33 34 origin { 35 name = "acceptanceTestCdnOrigin1" 36 host_name = "www.example.com" 37 } 38 } 39 ``` 40 41 ## Argument Reference 42 43 The following arguments are supported: 44 45 * `name` - (Required) Specifies the name of the CDN Endpoint. Changing this forces a 46 new resource to be created. 47 48 * `resource_group_name` - (Required) The name of the resource group in which to 49 create the CDN Endpoint. 50 51 * `profile_name` - (Required) The CDN Profile to which to attach the CDN Endpoint. 52 53 * `location` - (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. 54 55 * `origin_host_header` - (Optional) The host header CDN provider will send along with content requests to origins. Defaults to the host name of the origin. 56 57 * `is_http_allowed` - (Optional) Defaults to `true`. 58 59 * `is_https_allowed` - (Optional) Defaults to `true`. 60 61 * `origin` - (Optional) The set of origins of the CDN endpoint. When multiple origins exist, the first origin will be used as primary and rest will be used as failover options. 62 Each `origin` block supports fields documented below. 63 64 * `origin_path` - (Optional) The path used at for origin requests. 65 66 * `querystring_caching_behaviour` - (Optional) Sets query string caching behavior. Allowed values are `IgnoreQueryString`, `BypassCaching` and `UseQueryString`. Defaults to `IgnoreQueryString`. 67 68 * `content_types_to_compress` - (Optional) An array of strings that indicates a content types on which compression will be applied. The value for the elements should be MIME types. 69 70 * `is_compression_enabled` - (Optional) Indicates whether compression is to be enabled. Defaults to false. 71 72 * `tags` - (Optional) A mapping of tags to assign to the resource. 73 74 The `origin` block supports: 75 76 * `name` - (Required) The name of the origin. This is an arbitrary value. However, this value needs to be unique under endpoint. 77 78 * `host_name` - (Required) A string that determines the hostname/IP address of the origin server. This string could be a domain name, IPv4 address or IPv6 address. 79 80 * `http_port` - (Optional) The HTTP port of the origin. Defaults to null. When null, 80 will be used for HTTP. 81 82 * `https_port` - (Optional) The HTTPS port of the origin. Defaults to null. When null, 443 will be used for HTTPS. 83 84 ## Attributes Reference 85 86 The following attributes are exported: 87 88 * `id` - The CDN Endpoint ID. 89 90 ## Import 91 92 CDN Endpoints can be imported using the `resource id`, e.g. 93 94 ``` 95 terraform import azurerm_cdn_endpoint.test /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Cdn/profiles/myprofile1/endpoints/myendpoint1 96 ```