Azure CDN Endpoint Custom Domain
This page shows how to write Terraform and Azure Resource Manager for CDN Endpoint Custom Domain and write them securely.
azurerm_cdn_endpoint_custom_domain (Terraform)
The Endpoint Custom Domain in CDN can be configured in Terraform with the resource name azurerm_cdn_endpoint_custom_domain
. The following sections describe 1 example of how to use the resource and its parameters.
Example Usage from GitHub
resource "azurerm_cdn_endpoint_custom_domain" "this" {
for_each = { for frontend in var.shutter_apps : frontend.name => frontend
}
name = replace(each.value.custom_domain, ".", "-")
cdn_endpoint_id = azurerm_cdn_endpoint.shutter_endpoint[each.value.name].id
Parameters
The following arguments are supported:
name
- (Required) The name which should be used for this CDN Endpoint Custom Domain. Changing this forces a new CDN Endpoint Custom Domain to be created.cdn_endpoint_id
- (Required) The ID of the CDN Endpoint. Changing this forces a new CDN Endpoint Custom Domain to be created.host_name
- (Required) The host name of the custom domain. Changing this forces a new CDN Endpoint Custom Domain to be created.
Note: At this time only HTTP Custom Domains are supported.
In addition to the Arguments listed above - the following Attributes are exported:
id
- The ID of the CDN Endpoint Custom Domain.
Explanation in Terraform Registry
Manages a Custom Domain for a CDN Endpoint.
Microsoft.Cdn/profiles/endpoints/customDomains (Azure Resource Manager)
The profiles/endpoints/customDomains in Microsoft.Cdn can be configured in Azure Resource Manager with the resource name Microsoft.Cdn/profiles/endpoints/customDomains
. The following sections describe how to use the resource and its parameters.
Example Usage from GitHub
An example could not be found in GitHub.
Parameters
apiVersion
required - stringname
required - stringName of the custom domain within an endpoint.
properties
requiredhostName
required - stringThe host name of the custom domain. Must be a domain name.
type
required - string
Frequently asked questions
What is Azure CDN Endpoint Custom Domain?
Azure CDN Endpoint Custom Domain is a resource for CDN of Microsoft Azure. Settings can be wrote in Terraform.
Where can I find the example code for the Azure CDN Endpoint Custom Domain?
For Terraform, the hmcts/sharedservices-azure-platform source code example is useful. See the Terraform Example section for further details.