github.com/erriapo/terraform@v0.6.12-0.20160203182612-0340ea72354f/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  resource "azurerm_cdn_profile" "test" {
    21      name = "acceptanceTestCdnProfile1"
    22      location = "West US"
    23      resource_group_name = "${azurerm_resource_group.test.name}"
    24      sku = "Standard"
    25  }
    26  
    27  resource "azurerm_cdn_endpoint" "test" {
    28      name = "acceptanceTestCdnEndpoint1"
    29      profile_name = "${azurerm_cdn_profile.test.name}"
    30      location = "West US"
    31      resource_group_name = "${azurerm_resource_group.test.name}"
    32  
    33      origin {
    34  	    name = "acceptanceTestCdnOrigin1"
    35  	    host_name = "www.example.com"
    36      }
    37  }
    38  ```
    39  
    40  ## Argument Reference
    41  
    42  The following arguments are supported:
    43  
    44  * `name` - (Required) Specifies the name of the CDN Endpoint. Changing this forces a
    45      new resource to be created.
    46  
    47  * `resource_group_name` - (Required) The name of the resource group in which to
    48      create the CDN Endpoint.
    49      
    50  * `profile_name` - (Required) The CDN Profile to which to attach the CDN Endpoint.
    51  
    52  * `location` - (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    53  
    54  * `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.
    55  
    56  * `is_http_allowed` - (Optional) Defaults to `true`.
    57  
    58  * `is_https_allowed` - (Optional) Defaults to `true`.
    59  
    60  * `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. 
    61  Each `origin` block supports fields documented below.
    62  
    63  * `origin_path` - (Optional) The path used at for origin requests.
    64  
    65  * `querystring_caching_behaviour` - (Optional) Sets query string caching behavior. Allowed values are `IgnoreQueryString`, `BypassCaching` and `UseQueryString`. Defaults to `IgnoreQueryString`.
    66  
    67  * `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.
    68  
    69  * `is_compression_enabled` - (Optional) Indicates whether compression is to be enabled. Defaults to false.
    70  
    71  * `tags` - (Optional) A mapping of tags to assign to the resource. 
    72  
    73  The `origin` block supports:
    74  
    75  * `name` - (Required) The name of the origin. This is an arbitrary value. However, this value needs to be unique under endpoint.
    76  
    77  * `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.
    78  
    79  * `http_port` - (Optional) The HTTP port of the origin. Defaults to null. When null, 80 will be used for HTTP.
    80  
    81  * `https_port` - (Optional) The HTTPS port of the origin. Defaults to null. When null, 443 will be used for HTTPS.
    82  
    83  ## Attributes Reference
    84  
    85  The following attributes are exported:
    86  
    87  * `id` - The CDN Endpoint ID.