Created
May 29, 2023 13:57
-
-
Save ItayPodhajcer/4b96b196eec13b0354129b106aed2053 to your computer and use it in GitHub Desktop.
terraform-did-web-azure/main.tf#cdn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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