Skip to content

Instantly share code, notes, and snippets.

@ItayPodhajcer
Created May 29, 2023 13:57
Show Gist options
  • Save ItayPodhajcer/4b96b196eec13b0354129b106aed2053 to your computer and use it in GitHub Desktop.
Save ItayPodhajcer/4b96b196eec13b0354129b106aed2053 to your computer and use it in GitHub Desktop.
terraform-did-web-azure/main.tf#cdn
resource "azurerm_cdn_profile" "this" {
name = "cdn-${var.deployment_name}-${var.location}"
location = azurerm_resource_group.this.location
resource_group_name = azurerm_resource_group.this.name
sku = "Standard_Microsoft"
}
resource "azurerm_cdn_endpoint" "this" {
name = "endpoint-${var.deployment_name}-${var.location}"
profile_name = azurerm_cdn_profile.this.name
location = azurerm_resource_group.this.location
resource_group_name = azurerm_resource_group.this.name
origin_host_header = azurerm_storage_account.this.primary_web_host
querystring_caching_behaviour = "IgnoreQueryString"
origin {
name = var.deployment_name
host_name = azurerm_storage_account.this.primary_web_host
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment