cloudposse / terraform-aws-ecs-container-definition

Terraform module to generate well-formed JSON documents (container definitions) that are passed to the aws_ecs_task_definition Terraform resource
https://cloudposse.com/accelerate
Apache License 2.0
339 stars 244 forks source link

Add RestartPolicy to container definition #191

Open JaydenMaalouf opened 1 week ago

JaydenMaalouf commented 1 week ago

Describe the Feature

AWS introudced container restart policies to ECS containers This allows a container to restart on specific exit codes without needing to provision a new task https://docs.aws.amazon.com/AmazonECS/latest/developerguide/container-restart-policy.html?icmpid=docs_ecs_hp-task-definition

Expected Behavior

Restart policy will be created

Use Case

If a container abruptly exits with a specific exit code, it can be restarted without needing to wait for a new task to be provisioned in its place

Describe Ideal Solution

A new object on the variables map

Alternatives Considered

No response

Additional Context

No response