diff --git a/.tflint.hcl b/.tflint.hcl index 7d62c3b..0edcb65 100644 --- a/.tflint.hcl +++ b/.tflint.hcl @@ -6,7 +6,7 @@ plugin "aws" { plugin "terraform" { enabled = true - version = "0.8.0" + version = "0.9.0" source = "github.com/terraform-linters/tflint-ruleset-terraform" } diff --git a/.tool-versions b/.tool-versions index 03aedc5..f9e76fb 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,4 +1,4 @@ -terraform 1.9.2 +terraform 1.9.3 terraform-docs 0.18.0 tflint 0.52.0 -pre-commit 3.7.1 +pre-commit 3.8.0 diff --git a/README.md b/README.md index 2609f42..e378df1 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,8 @@ Terraform module which creates a ecs app | [elasticsearch](#requirement\_elasticsearch) | 2.0.7 | | [elasticstack](#requirement\_elasticstack) | 0.11.4 | | [gosoline](#requirement\_gosoline) | 1.3.0 | -| [grafana](#requirement\_grafana) | 2.13.0 | -| [sentry](#requirement\_sentry) | 0.12.2 | +| [grafana](#requirement\_grafana) | 3.7.0 | +| [sentry](#requirement\_sentry) | 0.13.1 | ## Providers @@ -29,7 +29,7 @@ Terraform module which creates a ecs app | [cloudwatch\_label](#module\_cloudwatch\_label) | justtrackio/label/null | 0.26.0 | | [container\_definition](#module\_container\_definition) | cloudposse/ecs-container-definition/aws | 0.61.1 | | [container\_definition\_fluentbit](#module\_container\_definition\_fluentbit) | cloudposse/ecs-container-definition/aws | 0.61.1 | -| [ecr](#module\_ecr) | terraform-aws-modules/ecr/aws | 1.6.0 | +| [ecr](#module\_ecr) | terraform-aws-modules/ecr/aws | 2.2.1 | | [ecr\_label](#module\_ecr\_label) | justtrackio/label/null | 0.26.0 | | [ecs\_label](#module\_ecs\_label) | justtrackio/label/null | 0.26.0 | | [ecs\_service\_task\_customized\_autoscaling](#module\_ecs\_service\_task\_customized\_autoscaling) | justtrackio/ecs-autoscaling/aws | 1.2.0 | @@ -73,9 +73,7 @@ Terraform module which creates a ecs app | [alarm\_service\_resources\_memory\_average](#input\_alarm\_service\_resources\_memory\_average) | Average MemoryUtilization alarm specs |
object({
datapoints_to_alarm = optional(number, 6)
evaluation_periods = optional(number, 6)
period = optional(number, 300)
threshold = optional(number, 125)
})
|
{
"datapoints_to_alarm": 6,
"evaluation_periods": 6,
"period": 300,
"threshold": 125
}
| no | | [alarm\_service\_resources\_memory\_maximum](#input\_alarm\_service\_resources\_memory\_maximum) | Maximum MemoryUtilization alarm specs |
object({
datapoints_to_alarm = optional(number, 15)
evaluation_periods = optional(number, 15)
period = optional(number, 60)
threshold = optional(number, 150)
})
|
{
"datapoints_to_alarm": 15,
"evaluation_periods": 15,
"period": 60,
"threshold": 150
}
| no | | [alarm\_service\_resources\_treat\_missing\_data](#input\_alarm\_service\_resources\_treat\_missing\_data) | How to treat missing data, defaults to 'breaching' | `string` | `"breaching"` | no | -| [alb\_health\_check\_interval](#input\_alb\_health\_check\_interval) | The duration in seconds in between health checks | `number` | `30` | no | -| [alb\_health\_check\_matcher](#input\_alb\_health\_check\_matcher) | The HTTP response codes to indicate a healthy check | `string` | `"200"` | no | -| [alb\_health\_check\_path](#input\_alb\_health\_check\_path) | The destination for the health check request | `string` | `"/health"` | no | +| [alb\_health\_check](#input\_alb\_health\_check) | ALB target group healthy check values |
object({
enabled = optional(bool, true)
healthy_threshold = optional(number, 2)
unhealthy_threshold = optional(number, 2)
threshold = optional(number, 2)
interval = optional(number, 30)
timeout = optional(number, 10)
matcher = optional(string, "200")
path = optional(string, "/health")
port = optional(string, "traffic-port")
protocol = optional(string, "HTTP")
})
| `{}` | no | | [alb\_name](#input\_alb\_name) | Name of the alb used to attach the target group | `string` | `""` | no | | [alb\_stickiness\_enabled](#input\_alb\_stickiness\_enabled) | Boolean to enable / disable `stickiness`. Default is `true` | `bool` | `false` | no | | [alb\_unauthenticated\_hosts](#input\_alb\_unauthenticated\_hosts) | Unauthenticated hosts to match in Hosts header | `list(string)` | `[]` | no | diff --git a/alb.tf b/alb.tf index df42a2f..8a78c28 100644 --- a/alb.tf +++ b/alb.tf @@ -14,9 +14,15 @@ module "alb_ingress" { unauthenticated_hosts = var.alb_unauthenticated_hosts unauthenticated_listener_arns = [data.aws_lb_listener.http[0].arn, data.aws_lb_listener.https[0].arn] - health_check_path = var.alb_health_check_path - health_check_matcher = var.alb_health_check_matcher - health_check_interval = var.alb_health_check_interval + health_check_enabled = var.alb_health_check.enabled + health_check_healthy_threshold = var.alb_health_check.healthy_threshold + health_check_interval = var.alb_health_check.interval + health_check_matcher = var.alb_health_check.matcher + health_check_path = var.alb_health_check.path + health_check_port = var.alb_health_check.port + health_check_protocol = var.alb_health_check.protocol + health_check_timeout = var.alb_health_check.timeout + health_check_unhealthy_threshold = var.alb_health_check.unhealthy_threshold stickiness_enabled = var.alb_stickiness_enabled } diff --git a/ecr.tf b/ecr.tf index 61406d8..0243e9b 100644 --- a/ecr.tf +++ b/ecr.tf @@ -10,7 +10,7 @@ module "ecr_label" { module "ecr" { source = "terraform-aws-modules/ecr/aws" - version = "1.6.0" + version = "2.2.1" repository_name = module.ecr_label.id tags = module.ecr_label.tags diff --git a/variables.tf b/variables.tf index 25756b4..62d4e1c 100644 --- a/variables.tf +++ b/variables.tf @@ -128,22 +128,21 @@ variable "alarm_service_resources_treat_missing_data" { description = "How to treat missing data, defaults to 'breaching'" } -variable "alb_health_check_interval" { - type = number - default = 30 - description = "The duration in seconds in between health checks" -} - -variable "alb_health_check_matcher" { - type = string - default = "200" - description = "The HTTP response codes to indicate a healthy check" -} - -variable "alb_health_check_path" { - type = string - default = "/health" - description = "The destination for the health check request" +variable "alb_health_check" { + type = object({ + enabled = optional(bool, true) + healthy_threshold = optional(number, 2) + unhealthy_threshold = optional(number, 2) + threshold = optional(number, 2) + interval = optional(number, 30) + timeout = optional(number, 10) + matcher = optional(string, "200") + path = optional(string, "/health") + port = optional(string, "traffic-port") + protocol = optional(string, "HTTP") + }) + default = {} + description = "ALB target group healthy check values" } variable "alb_name" { diff --git a/versions.tf b/versions.tf index 2a622d4..b91edbb 100644 --- a/versions.tf +++ b/versions.tf @@ -17,7 +17,7 @@ terraform { grafana = { source = "grafana/grafana" - version = "2.13.0" + version = "3.7.0" } elasticstack = { @@ -27,7 +27,7 @@ terraform { sentry = { source = "jianyuan/sentry" - version = "0.12.2" + version = "0.13.1" } }