Skip to content

Commit

Permalink
Merge branch 'main' into workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
DrizzlyOwl committed Mar 23, 2023
2 parents 0ba9ad9 + 8895c14 commit 64784dd
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 16 deletions.
28 changes: 14 additions & 14 deletions terraform/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion terraform/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ No providers.

| Name | Source | Version |
|------|--------|---------|
| <a name="module_azure_container_apps_hosting"></a> [azure\_container\_apps\_hosting](#module\_azure\_container\_apps\_hosting) | github.com/DFE-Digital/terraform-azurerm-container-apps-hosting | v0.14.6 |
| <a name="module_azure_container_apps_hosting"></a> [azure\_container\_apps\_hosting](#module\_azure\_container\_apps\_hosting) | github.com/DFE-Digital/terraform-azurerm-container-apps-hosting | v0.16.0 |
| <a name="module_azurerm_key_vault"></a> [azurerm\_key\_vault](#module\_azurerm\_key\_vault) | github.com/DFE-Digital/terraform-azurerm-key-vault-tfvars | v0.1.1 |

## Resources
Expand All @@ -148,14 +148,19 @@ No resources.
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_azure_location"></a> [azure\_location](#input\_azure\_location) | Azure location in which to launch resources. | `string` | n/a | yes |
| <a name="input_cdn_frontdoor_custom_domains"></a> [cdn\_frontdoor\_custom\_domains](#input\_cdn\_frontdoor\_custom\_domains) | Azure CDN Front Door custom domains. If they are within the DNS zone (optionally created), the Validation TXT records and ALIAS/CNAME records will be created | `list(string)` | n/a | yes |
| <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_container_command"></a> [container\_command](#input\_container\_command) | Container command | `list(any)` | n/a | yes |
| <a name="input_container_health_probe_path"></a> [container\_health\_probe\_path](#input\_container\_health\_probe\_path) | Specifies the path that is used to determine the liveness of the Container | `string` | n/a | yes |
| <a name="input_container_secret_environment_variables"></a> [container\_secret\_environment\_variables](#input\_container\_secret\_environment\_variables) | Container secret environment variables | `map(string)` | n/a | yes |
| <a name="input_dns_ns_records"></a> [dns\_ns\_records](#input\_dns\_ns\_records) | DNS NS records to add to the DNS Zone | <pre>map(<br> object({<br> ttl : optional(number, 300),<br> records : list(string)<br> })<br> )</pre> | n/a | yes |
| <a name="input_dns_txt_records"></a> [dns\_txt\_records](#input\_dns\_txt\_records) | DNS TXT records to add to the DNS Zone | <pre>map(<br> object({<br> ttl : optional(number, 300),<br> records : list(string)<br> })<br> )</pre> | n/a | yes |
| <a name="input_dns_zone_domain_name"></a> [dns\_zone\_domain\_name](#input\_dns\_zone\_domain\_name) | DNS zone domain name. If created, records will automatically be created to point to the CDN. | `string` | n/a | yes |
| <a name="input_enable_cdn_frontdoor"></a> [enable\_cdn\_frontdoor](#input\_enable\_cdn\_frontdoor) | Enable Azure CDN FrontDoor. This will use the Container Apps endpoint as the origin. | `bool` | n/a | yes |
| <a name="input_enable_container_registry"></a> [enable\_container\_registry](#input\_enable\_container\_registry) | Set to true to create a container registry | `bool` | n/a | yes |
| <a name="input_enable_dns_zone"></a> [enable\_dns\_zone](#input\_enable\_dns\_zone) | Conditionally create a DNS zone | `bool` | n/a | yes |
| <a name="input_enable_event_hub"></a> [enable\_event\_hub](#input\_enable\_event\_hub) | Send Azure Container App logs to an Event Hub sink | `bool` | n/a | yes |
| <a name="input_enable_monitoring"></a> [enable\_monitoring](#input\_enable\_monitoring) | Create an App Insights instance and notification group for the Container App | `bool` | n/a | yes |
| <a name="input_environment"></a> [environment](#input\_environment) | Environment name. Will be used along with `project_name` as a prefix for all resources. | `string` | n/a | yes |
Expand Down
8 changes: 7 additions & 1 deletion terraform/container-apps-hosting.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module "azure_container_apps_hosting" {
source = "github.com/DFE-Digital/terraform-azurerm-container-apps-hosting?ref=v0.14.6"
source = "github.com/DFE-Digital/terraform-azurerm-container-apps-hosting?ref=v0.16.0"

environment = local.environment
project_name = local.project_name
Expand All @@ -10,13 +10,19 @@ module "azure_container_apps_hosting" {

enable_container_registry = local.enable_container_registry

enable_dns_zone = local.enable_dns_zone
dns_zone_domain_name = local.dns_zone_domain_name
dns_ns_records = local.dns_ns_records
dns_txt_records = local.dns_txt_records

image_name = local.image_name
container_command = local.container_command
container_secret_environment_variables = local.container_secret_environment_variables

enable_cdn_frontdoor = local.enable_cdn_frontdoor
cdn_frontdoor_enable_rate_limiting = local.cdn_frontdoor_enable_rate_limiting
cdn_frontdoor_host_add_response_headers = local.cdn_frontdoor_host_add_response_headers
cdn_frontdoor_custom_domains = local.cdn_frontdoor_custom_domains

enable_event_hub = local.enable_event_hub

Expand Down
5 changes: 5 additions & 0 deletions terraform/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,17 @@ locals {
container_secret_environment_variables = var.container_secret_environment_variables
enable_cdn_frontdoor = var.enable_cdn_frontdoor
enable_event_hub = var.enable_event_hub
enable_dns_zone = var.enable_dns_zone
dns_zone_domain_name = var.dns_zone_domain_name
dns_ns_records = var.dns_ns_records
dns_txt_records = var.dns_txt_records
key_vault_access_users = toset(var.key_vault_access_users)
tfvars_filename = var.tfvars_filename
enable_monitoring = var.enable_monitoring
monitor_email_receivers = var.monitor_email_receivers
cdn_frontdoor_enable_rate_limiting = var.cdn_frontdoor_enable_rate_limiting
cdn_frontdoor_host_add_response_headers = var.cdn_frontdoor_host_add_response_headers
cdn_frontdoor_custom_domains = var.cdn_frontdoor_custom_domains
container_health_probe_path = var.container_health_probe_path
cdn_frontdoor_health_probe_path = var.cdn_frontdoor_health_probe_path
monitor_endpoint_healthcheck = var.monitor_endpoint_healthcheck
Expand Down
35 changes: 35 additions & 0 deletions terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,36 @@ variable "container_secret_environment_variables" {
sensitive = true
}

variable "enable_dns_zone" {
description = "Conditionally create a DNS zone"
type = bool
}

variable "dns_zone_domain_name" {
description = "DNS zone domain name. If created, records will automatically be created to point to the CDN."
type = string
}

variable "dns_ns_records" {
description = "DNS NS records to add to the DNS Zone"
type = map(
object({
ttl : optional(number, 300),
records : list(string)
})
)
}

variable "dns_txt_records" {
description = "DNS TXT records to add to the DNS Zone"
type = map(
object({
ttl : optional(number, 300),
records : list(string)
})
)
}

variable "enable_cdn_frontdoor" {
description = "Enable Azure CDN FrontDoor. This will use the Container Apps endpoint as the origin."
type = bool
Expand Down Expand Up @@ -89,6 +119,11 @@ variable "cdn_frontdoor_health_probe_path" {
type = string
}

variable "cdn_frontdoor_custom_domains" {
description = "Azure CDN Front Door custom domains. If they are within the DNS zone (optionally created), the Validation TXT records and ALIAS/CNAME records will be created"
type = list(string)
}

variable "monitor_endpoint_healthcheck" {
description = "Specify a route that should be monitored for a 200 OK status"
type = string
Expand Down

0 comments on commit 64784dd

Please sign in to comment.