-
-
Notifications
You must be signed in to change notification settings - Fork 627
feat: Remove empty containers (map/list) from container definition #336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
description = "Container restart policy; helps overcome transient failures faster and maintain task availability" | ||
type = object({ | ||
enabled = optional(bool) | ||
enabled = optional(bool, true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to add this back for this logic to work https://github.com/terraform-aws-modules/terraform-aws-ecs/pull/336/files#diff-2495e85ca74f46479d907910afcb9c141838715fafd982408869e6e7a5e98bbcR71
repositoryCredentials = var.repositoryCredentials | ||
resourceRequirements = var.resourceRequirements | ||
restartPolicy = { for k, v in var.restartPolicy : k => v if v != null } | ||
restartPolicy = local.trimmedRestartPolicy.enabled ? local.trimmedRestartPolicy : null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if enabled = false
then we don't send any configs for restartPolicy
to the Task Definition API call
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it works, LGTM :)
## [6.2.0](v6.1.4...v6.2.0) (2025-08-07) ### Features * Remove empty containers (map/list) from container definition ([#336](#336)) ([24746cc](24746cc))
This PR is included in version 6.2.0 🎉 |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Description
Motivation and Context
relates to hashicorp/terraform-provider-aws#17988
Breaking Changes
How Has This Been Tested?
examples/*
to demonstrate and validate my change(s)examples/*
projectspre-commit run -a
on my pull requestDeploying the

complete
example frommaster
and then changing to this PR produces the following desired diff