Skip to content

Commit

Permalink
Merge pull request #234 from DFE-Digital/dns-records
Browse files Browse the repository at this point in the history
Add TXT and NS record deployment options
  • Loading branch information
DrizzlyOwl authored Apr 19, 2023
2 parents fe6b67e + eeed359 commit 8560cfa
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
2 changes: 2 additions & 0 deletions terraform/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ No resources.
| <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 |
Expand Down
2 changes: 2 additions & 0 deletions terraform/container-apps-hosting.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ module "azure_container_apps_hosting" {

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

enable_cdn_frontdoor = local.enable_cdn_frontdoor
cdn_frontdoor_enable_rate_limiting = local.cdn_frontdoor_enable_rate_limiting
Expand Down
2 changes: 2 additions & 0 deletions terraform/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ locals {
enable_mssql_database = var.enable_mssql_database
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
enable_cdn_frontdoor = var.enable_cdn_frontdoor
cdn_frontdoor_enable_rate_limiting = var.cdn_frontdoor_enable_rate_limiting
cdn_frontdoor_rate_limiting_duration_in_minutes = var.cdn_frontdoor_rate_limiting_duration_in_minutes
Expand Down
20 changes: 20 additions & 0 deletions terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,23 @@ 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)
})
)
}

0 comments on commit 8560cfa

Please sign in to comment.