Skip to content

Commit

Permalink
enable container restart policy for beta
Browse files Browse the repository at this point in the history
  • Loading branch information
zhelezovartem committed Oct 28, 2024
1 parent 94a45e3 commit e507463
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions deployment/terraform/274425519734-eu-central-1.tfvars
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
env = "prod"

container_restart_policy_enabled = false

# Allow to replicate app docker images from this account
ecr_replication_origin = "244531986313"
4 changes: 3 additions & 1 deletion deployment/terraform/deployment.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module "ecs-service" {
source = "s3::https://s3-eu-central-1.amazonaws.com/terraform-modules-9d7e951c290ec5bbe6506e0ddb064808764bc636/terraform-modules.zip//ecs-service/v4"
source = "s3::https://s3-eu-central-1.amazonaws.com/terraform-modules-9d7e951c290ec5bbe6506e0ddb064808764bc636/terraform-modules.zip//ecs-service/v5"
service_name = var.service_name
TAGGED_IMAGE = var.TAGGED_IMAGE
enable_execute_command = "true"
Expand All @@ -9,5 +9,7 @@ module "ecs-service" {
mem_limit = var.mem_limit
app_env_vars = local.app_env_vars
ecs_wait_for_steady_state = false
ecs_service_update_timeout = "10m"
container_restart_policy_enabled = var.container_restart_policy_enabled
tags = module.tags.result
}
6 changes: 6 additions & 0 deletions deployment/terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ variable "mem_reservation" {
default = 32
}

variable "container_restart_policy_enabled" {
description = "Whether to enable restart policy for the container."
type = bool
default = true
}

variable "TAGGED_IMAGE" {
type = string
}
Expand Down
2 changes: 1 addition & 1 deletion deployment/terraform/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 5.25.0"
version = "~> 5.73.0"
}
random = {
source = "hashicorp/random"
Expand Down

0 comments on commit e507463

Please sign in to comment.