Skip to content

Commit

Permalink
Terraform dependency updates (#983)
Browse files Browse the repository at this point in the history
* Update to Container App module v1.4.9

* This version allows us to set the HTTP request threshold that triggers scale-out

* Updated TF to 1.7.1

* Updated packages
  • Loading branch information
DrizzlyOwl authored Feb 15, 2024
1 parent 84ee7a1 commit 904c5ac
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 33 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/continuous-integration-terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,19 @@ jobs:
run: rm ./terraform/backend.tf

- name: Run a Terraform init
uses: docker://hashicorp/terraform:1.6.4
uses: docker://hashicorp/terraform:1.7.1
with:
entrypoint: terraform
args: -chdir=terraform init

- name: Run a Terraform validate
uses: docker://hashicorp/terraform:1.6.4
uses: docker://hashicorp/terraform:1.7.1
with:
entrypoint: terraform
args: -chdir=terraform validate

- name: Run a Terraform format check
uses: docker://hashicorp/terraform:1.6.4
uses: docker://hashicorp/terraform:1.7.1
with:
entrypoint: terraform
args: -chdir=terraform fmt -check=true -diff=true
Expand Down
2 changes: 1 addition & 1 deletion terraform/.terraform-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.6.4
1.7.1
54 changes: 27 additions & 27 deletions terraform/.terraform.lock.hcl

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

3 changes: 2 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 | v1.4.5 |
| <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 | v1.4.9 |
| <a name="module_azurerm_key_vault"></a> [azurerm\_key\_vault](#module\_azurerm\_key\_vault) | github.com/DFE-Digital/terraform-azurerm-key-vault-tfvars | v0.3.0 |
| <a name="module_statuscake-tls-monitor"></a> [statuscake-tls-monitor](#module\_statuscake-tls-monitor) | github.com/dfe-digital/terraform-statuscake-tls-monitor | v0.1.2 |

Expand All @@ -163,6 +163,7 @@ 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_max_replicas"></a> [container\_max\_replicas](#input\_container\_max\_replicas) | Container max replicas | `number` | n/a | yes |
| <a name="input_container_scale_http_concurrency"></a> [container\_scale\_http\_concurrency](#input\_container\_scale\_http\_concurrency) | When the number of concurrent HTTP requests exceeds this value, then another replica is added. Replicas continue to add to the pool up to the max-replicas amount. | `number` | `10` | no |
| <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 |
Expand Down
3 changes: 2 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=v1.4.5"
source = "github.com/DFE-Digital/terraform-azurerm-container-apps-hosting?ref=v1.4.9"

environment = local.environment
project_name = local.project_name
Expand All @@ -26,6 +26,7 @@ module "azure_container_apps_hosting" {
container_command = local.container_command
container_secret_environment_variables = local.container_secret_environment_variables
container_max_replicas = local.container_max_replicas
container_scale_http_concurrency = local.container_scale_http_concurrency

enable_cdn_frontdoor = local.enable_cdn_frontdoor
cdn_frontdoor_forwarding_protocol = local.cdn_frontdoor_forwarding_protocol
Expand Down
1 change: 1 addition & 0 deletions terraform/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ locals {
container_command = var.container_command
container_secret_environment_variables = var.container_secret_environment_variables
container_max_replicas = var.container_max_replicas
container_scale_http_concurrency = var.container_scale_http_concurrency
enable_event_hub = var.enable_event_hub
enable_logstash_consumer = var.enable_logstash_consumer
eventhub_export_log_analytics_table_names = var.eventhub_export_log_analytics_table_names
Expand Down
6 changes: 6 additions & 0 deletions terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@ variable "container_max_replicas" {
type = number
}

variable "container_scale_http_concurrency" {
description = "When the number of concurrent HTTP requests exceeds this value, then another replica is added. Replicas continue to add to the pool up to the max-replicas amount."
type = number
default = 10
}

variable "enable_event_hub" {
description = "Send Azure Container App logs to an Event Hub sink"
type = bool
Expand Down

0 comments on commit 904c5ac

Please sign in to comment.