Skip to content

Commit

Permalink
Override option for changing CDN Origin
Browse files Browse the repository at this point in the history
  • Loading branch information
DrizzlyOwl committed Apr 19, 2023
1 parent 3e039b9 commit c63c21f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions terraform/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ No resources.
| <a name="input_cdn_frontdoor_enable_rate_limiting"></a> [cdn\_frontdoor\_enable\_rate\_limiting](#input\_cdn\_frontdoor\_enable\_rate\_limiting) | Enable CDN Front Door Rate Limiting. This will create a WAF policy, and CDN security policy. For pricing reasons, there will only be one WAF policy created. | `bool` | n/a | yes |
| <a name="input_cdn_frontdoor_health_probe_path"></a> [cdn\_frontdoor\_health\_probe\_path](#input\_cdn\_frontdoor\_health\_probe\_path) | Specifies the path relative to the origin that is used to determine the health of the origin. | `string` | n/a | yes |
| <a name="input_cdn_frontdoor_host_add_response_headers"></a> [cdn\_frontdoor\_host\_add\_response\_headers](#input\_cdn\_frontdoor\_host\_add\_response\_headers) | List of response headers to add at the CDN Front Door `[{ "name" = "Strict-Transport-Security", "value" = "max-age=31536000" }]` | `list(map(string))` | n/a | yes |
| <a name="input_cdn_frontdoor_origin_fqdn_override"></a> [cdn\_frontdoor\_origin\_fqdn\_override](#input\_cdn\_frontdoor\_origin\_fqdn\_override) | Manually specify the hostname that the CDN Front Door should target. Defaults to the Container App FQDN | `string` | `""` | no |
| <a name="input_cdn_frontdoor_rate_limiting_duration_in_minutes"></a> [cdn\_frontdoor\_rate\_limiting\_duration\_in\_minutes](#input\_cdn\_frontdoor\_rate\_limiting\_duration\_in\_minutes) | CDN Front Door rate limiting duration in minutes | `number` | n/a | yes |
| <a name="input_cdn_frontdoor_rate_limiting_threshold"></a> [cdn\_frontdoor\_rate\_limiting\_threshold](#input\_cdn\_frontdoor\_rate\_limiting\_threshold) | CDN Front Door rate limiting duration in minutes | `number` | n/a | yes |
| <a name="input_container_command"></a> [container\_command](#input\_container\_command) | Container command | `list(any)` | n/a | yes |
Expand Down
1 change: 1 addition & 0 deletions terraform/container-apps-hosting.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ module "azure_container_apps_hosting" {
cdn_frontdoor_rate_limiting_threshold = local.cdn_frontdoor_rate_limiting_threshold
cdn_frontdoor_host_add_response_headers = local.cdn_frontdoor_host_add_response_headers
cdn_frontdoor_custom_domains = local.cdn_frontdoor_custom_domains
cdn_frontdoor_origin_fqdn_override = local.cdn_frontdoor_origin_fqdn_override

enable_monitoring = local.enable_monitoring
monitor_email_receivers = local.monitor_email_receivers
Expand Down
1 change: 1 addition & 0 deletions terraform/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ locals {
cdn_frontdoor_rate_limiting_threshold = var.cdn_frontdoor_rate_limiting_threshold
cdn_frontdoor_host_add_response_headers = var.cdn_frontdoor_host_add_response_headers
cdn_frontdoor_custom_domains = var.cdn_frontdoor_custom_domains
cdn_frontdoor_origin_fqdn_override = var.cdn_frontdoor_origin_fqdn_override
key_vault_access_users = toset(var.key_vault_access_users)
key_vault_access_ipv4 = var.key_vault_access_ipv4
tfvars_filename = var.tfvars_filename
Expand Down
6 changes: 6 additions & 0 deletions terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ variable "enable_cdn_frontdoor" {
type = bool
}

variable "cdn_frontdoor_origin_fqdn_override" {
description = "Manually specify the hostname that the CDN Front Door should target. Defaults to the Container App FQDN"
type = string
default = ""
}

variable "cdn_frontdoor_enable_rate_limiting" {
description = "Enable CDN Front Door Rate Limiting. This will create a WAF policy, and CDN security policy. For pricing reasons, there will only be one WAF policy created."
type = bool
Expand Down

0 comments on commit c63c21f

Please sign in to comment.