-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
aws_ecs_task_definition needs updating even if nothing changes (look at "portMappings") #3401
Comments
NEW FINDING!
|
Hey everyone, let me know if you need me to do any troubleshooting or answer any questions for you |
I've been seeing the same thing and it's finally annoyed me enough to take a look at it. However while I have a few other things that cause a diff (duplicated environment variables due to hacking things for variable environment configuration in a module) I also see the same issue as @seanscottking around Taking a look at the code though there's already code to suppress the diff when |
We've been hitting this as well. It is absolutely the As per the AWS docs, the To be more concrete, the following TF config:
Will generate the following state:
Note in particular the addition of the
I believe that a reasonable fix inline with the docs would be to ignore differences between Thoughts? |
When using the `awsvpc` networking mode, aws assigns the value of `containerPort` to the `hostPort` for each item in `portMappings`. This leads to spurious diffs if the user doesn't set `hostPort`. This patch suppresses diffs when using `awsvpc` networking and the `hostPort` field is unset. [Fixes hashicorp#3401]
The fix for this has been merged into master and will release with version 1.36.0 of the AWS provider, likely tomorrow. 👍 |
The provider also keeps updating Terraform v0.11.7 For example, this task definition keeps updating:
So I have to include whole config to fix the issue:
Update: this behaviour could be happen in the latest version at the moment: v1.35.0 |
@viatcheslavmogilevsky can you please open a separate issue or double check that there is not an existing The port mappings fix has been released in version 1.36.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Terraform Version
Terraform v0.11.3
Affected Resource(s)
Please list the resources as a list, for example:
Terraform Configuration Files
Debug Output
I will paste upon request. Too lazy to edit out sensitive data.
Panic Output
no panic output
Expected Behavior
aws_ecs_task_definition
did not change, so it needs no updateActual Behavior
aws_ecs_task_definition
needed an updateSteps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
Important Factoids
I am 99% certain the
portMappings
is to blame. If I delete settings inportMappings
area, the task does not need an update.References
Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here?
#2339
The text was updated successfully, but these errors were encountered: