Skip to content

fix: Set correct default for runtime_platform to ensure idempotence #291

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

affelaffen
Copy link
Contributor

Description

Changed the default value for the runtime_platform to avoid recreation of the aws_ecs_task_definition on every apply when not specifying any runtime_platform values. Since the dynamic block for the runtime_platform checks if the variable is null before trying to set a value and the current default value is set to an empty map, it will always try to add an empty map to the task definition. This causes terraform to consider it a change, which forces replacement of both the aws_ecs_task_definition and the aws_ecs_service.

Motivation and Context

The issue was introduced in #279, which added this support for runtime_platform.

Breaking Changes

No 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

@affelaffen affelaffen changed the title fix: set correct default for runtime_platform to ensure idempotence fix: Set correct default for runtime_platform to ensure idempotence Jun 22, 2022
@antonbabenko antonbabenko merged commit 96c8613 into terraform-aws-modules:master Jun 22, 2022
antonbabenko pushed a commit that referenced this pull request Jun 22, 2022
### [3.17.1](v3.17.0...v3.17.1) (2022-06-22)

### Bug Fixes

* set correct default for runtime_platform variable to ensure idempotence ([#291](#291)) ([96c8613](96c8613))
@antonbabenko
Copy link
Member

This PR is included in version 3.17.1 🎉

@affelaffen affelaffen deleted the runtime-platform-default-fix branch June 22, 2022 08:19
@github-actions
Copy link

github-actions bot commented Nov 8, 2022

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 8, 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.

2 participants