-
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
fix: ECS EFS volume transit_encryption_port default value causing unwanted diff #34020
fix: ECS EFS volume transit_encryption_port default value causing unwanted diff #34020
Conversation
Community NoteVoting for Prioritization
For Submitters
|
Thank you for your contribution! 🚀 Please note that the Remove any changes to the |
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.
Welcome @kgns 👋
It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTOR guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.
Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.
Thanks again, and welcome to the community! 😃
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.
LGTM 🚀.
% make testacc TESTARGS='-run=TestAccECSTaskDefinition_EFSVolume' PKG=ecs ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ecs/... -v -count 1 -parallel 2 -run=TestAccECSTaskDefinition_EFSVolume -timeout 360m
=== RUN TestAccECSTaskDefinition_EFSVolume_minimal
=== PAUSE TestAccECSTaskDefinition_EFSVolume_minimal
=== RUN TestAccECSTaskDefinition_EFSVolume_basic
=== PAUSE TestAccECSTaskDefinition_EFSVolume_basic
=== RUN TestAccECSTaskDefinition_EFSVolume_transitEncryptionMinimal
=== PAUSE TestAccECSTaskDefinition_EFSVolume_transitEncryptionMinimal
=== RUN TestAccECSTaskDefinition_EFSVolume_transitEncryption
=== PAUSE TestAccECSTaskDefinition_EFSVolume_transitEncryption
=== RUN TestAccECSTaskDefinition_EFSVolume_transitEncryptionDisabled
=== PAUSE TestAccECSTaskDefinition_EFSVolume_transitEncryptionDisabled
=== RUN TestAccECSTaskDefinition_EFSVolume_accessPoint
=== PAUSE TestAccECSTaskDefinition_EFSVolume_accessPoint
=== CONT TestAccECSTaskDefinition_EFSVolume_minimal
=== CONT TestAccECSTaskDefinition_EFSVolume_transitEncryption
--- PASS: TestAccECSTaskDefinition_EFSVolume_transitEncryption (35.01s)
=== CONT TestAccECSTaskDefinition_EFSVolume_accessPoint
--- PASS: TestAccECSTaskDefinition_EFSVolume_minimal (35.03s)
=== CONT TestAccECSTaskDefinition_EFSVolume_transitEncryptionDisabled
--- PASS: TestAccECSTaskDefinition_EFSVolume_transitEncryptionDisabled (34.42s)
=== CONT TestAccECSTaskDefinition_EFSVolume_transitEncryptionMinimal
--- PASS: TestAccECSTaskDefinition_EFSVolume_accessPoint (38.21s)
=== CONT TestAccECSTaskDefinition_EFSVolume_basic
--- PASS: TestAccECSTaskDefinition_EFSVolume_transitEncryptionMinimal (33.60s)
--- PASS: TestAccECSTaskDefinition_EFSVolume_basic (32.86s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/ecs 111.519s
@kgns Thanks for the contribution 🎉 👏. |
This functionality has been released in v5.23.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
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. |
Description
This bug has been "bugging" me for a while. I think #19549 and #23541 are both also related to this.
When we omit
transit_encryption_port
attribute for aefs_volume_configuration
block in aaws_ecs_task_definition
resource, its value is saved asnull
in the state file, but AWS API returns0
when queried. In the ECS documentation it can also be seen 0 is the default value for this field. So I have set 0 as the default value, and also changed the validation function toIsPortNumberOrZero
so we can either avoid it and let it default to 0, or we can explicitly set it to 0, and there will not be any diff between what AWS returns and what we have in the state file.As far as I can remember, this bug never forced any replacements on the task definition by itself, but was only visible when it was accompanied with another change.
Relations
Closes #19549
Closes #23541
References
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-definition-template.html
Output from Acceptance Testing