Skip to content
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

fix: Cannot specify more than one extra_container_definitions #314

Merged

Conversation

dynamike
Copy link
Member

@dynamike dynamike commented Oct 19, 2022

Description

Resolves issues defined in #269 when trying to pass in multiple container definitions into extra_container_definitions. The main issue is Terraform's requirement for exact matching objects when untyping a variable as any More detail is defined in hashicorp/terraform#26265. For the time being, this PR untypes the variable to get around the error. A more robust solution would leverage required and optional attributes to define a container definition.

Motivation and Context

Resolves #269, which seems like an increasingly common issue with more and more sidecar containers used for things like log routing and observability.

Breaking Changes

There shouldn't be any breaking changes.

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • I have tested and validated these changes using one or more of the provided examples/* projects
  • I have executed pre-commit run -a on my pull request

versions.tf Outdated
@@ -1,5 +1,5 @@
terraform {
required_version = ">= 0.13.1"
required_version = ">= 1.3.0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a breaking change and we do not want to push users to the bleeding edge as it will reduce adoption

Copy link
Member

@bryantbiggs bryantbiggs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can provide a solution without the need for a breaking change and pushing users to use the latest version of Terraform

@dynamike
Copy link
Member Author

Makes sense about limiting the impact of the required terraform version. I think I've found another way to do it without needing all the explicit typing. I'll update this PR.

@dynamike dynamike requested a review from bryantbiggs October 21, 2022 16:25
@bryantbiggs
Copy link
Member

Thank you @dynamike

@bryantbiggs bryantbiggs merged commit 7c1ad25 into terraform-aws-modules:master Oct 22, 2022
antonbabenko pushed a commit that referenced this pull request Oct 22, 2022
### [3.22.1](v3.22.0...v3.22.1) (2022-10-22)

### Bug Fixes

* Cannot specify more than one extra_container_definitions ([#314](#314)) ([7c1ad25](7c1ad25))
@antonbabenko
Copy link
Member

This PR is included in version 3.22.1 🎉

@dynamike dynamike deleted the mk-types-container-defs branch October 24, 2022 16:44
@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot specify more than one extra_container_definitions
3 participants