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

r/ecs_task_definition - fix hash differences for efs volume #12751

Merged
merged 4 commits into from
May 26, 2020

Conversation

DrFaust92
Copy link
Collaborator

@DrFaust92 DrFaust92 commented Apr 9, 2020

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Closes #12190

Release note for CHANGELOG:

resource_aws_ecs_task_definition - fix hash differences for `volume` block

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSEcsTaskDefinition_'
--- PASS: TestAccAWSEcsTaskDefinition_basic (73.09s)
--- PASS: TestAccAWSEcsTaskDefinition_withScratchVolume (43.74s)
--- PASS: TestAccAWSEcsTaskDefinition_withDockerVolume (42.88s)
--- PASS: TestAccAWSEcsTaskDefinition_withDockerVolumeMinimalConfig (49.40s)
--- PASS: TestAccAWSEcsTaskDefinition_withEFSVolumeMinimal (62.29s)
--- PASS: TestAccAWSEcsTaskDefinition_withEFSVolume (63.41s)
--- PASS: TestAccAWSEcsTaskDefinition_withEcsService (149.76s)
--- PASS: TestAccAWSEcsTaskDefinition_withTaskRoleArn (48.86s)
--- PASS: TestAccAWSEcsTaskDefinition_withNetworkMode (49.80s)
--- PASS: TestAccAWSEcsTaskDefinition_withIPCMode (48.08s)
--- PASS: TestAccAWSEcsTaskDefinition_withPidMode (49.61s)
--- PASS: TestAccAWSEcsTaskDefinition_constraint (42.94s)
--- PASS: TestAccAWSEcsTaskDefinition_changeVolumesForcesNewResource (72.84s)
--- PASS: TestAccAWSEcsTaskDefinition_arrays (43.73s)
--- PASS: TestAccAWSEcsTaskDefinition_Fargate (59.03s)
--- PASS: TestAccAWSEcsTaskDefinition_ExecutionRole (51.76s)
--- PASS: TestAccAWSEcsTaskDefinition_Inactive (68.68s)
--- PASS: TestAccAWSEcsTaskDefinition_Tags (107.83s)
--- PASS: TestAccAWSEcsTaskDefinition_ProxyConfiguration (56.15s)
--- PASS: TestAccAWSEcsTaskDefinition_inferenceAccelerator (41.28s)

As a note to maintainers if possible to merge #12571 prior to this one that would be great

@DrFaust92 DrFaust92 requested a review from a team April 9, 2020 15:32
@ghost ghost added needs-triage Waiting for first response or review from a maintainer. size/L Managed by automation to categorize the size of a PR. service/ecs Issues and PRs that pertain to the ecs service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Apr 9, 2020
@DrFaust92 DrFaust92 changed the title [WIP]r/ecs_task_definition - fix hash differences for volume r/ecs_task_definition - fix hash differences for efs volume Apr 9, 2020
@ewbankkit
Copy link
Contributor

Verified acceptance tests:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSEcsTaskDefinition_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAWSEcsTaskDefinition_ -timeout 120m
=== RUN   TestAccAWSEcsTaskDefinition_basic
=== PAUSE TestAccAWSEcsTaskDefinition_basic
=== RUN   TestAccAWSEcsTaskDefinition_withScratchVolume
=== PAUSE TestAccAWSEcsTaskDefinition_withScratchVolume
=== RUN   TestAccAWSEcsTaskDefinition_withDockerVolume
=== PAUSE TestAccAWSEcsTaskDefinition_withDockerVolume
=== RUN   TestAccAWSEcsTaskDefinition_withDockerVolumeMinimalConfig
=== PAUSE TestAccAWSEcsTaskDefinition_withDockerVolumeMinimalConfig
=== RUN   TestAccAWSEcsTaskDefinition_withEFSVolumeMinimal
=== PAUSE TestAccAWSEcsTaskDefinition_withEFSVolumeMinimal
=== RUN   TestAccAWSEcsTaskDefinition_withEFSVolume
=== PAUSE TestAccAWSEcsTaskDefinition_withEFSVolume
=== RUN   TestAccAWSEcsTaskDefinition_withTaskScopedDockerVolume
=== PAUSE TestAccAWSEcsTaskDefinition_withTaskScopedDockerVolume
=== RUN   TestAccAWSEcsTaskDefinition_withEcsService
=== PAUSE TestAccAWSEcsTaskDefinition_withEcsService
=== RUN   TestAccAWSEcsTaskDefinition_withTaskRoleArn
=== PAUSE TestAccAWSEcsTaskDefinition_withTaskRoleArn
=== RUN   TestAccAWSEcsTaskDefinition_withNetworkMode
=== PAUSE TestAccAWSEcsTaskDefinition_withNetworkMode
=== RUN   TestAccAWSEcsTaskDefinition_withIPCMode
=== PAUSE TestAccAWSEcsTaskDefinition_withIPCMode
=== RUN   TestAccAWSEcsTaskDefinition_withPidMode
=== PAUSE TestAccAWSEcsTaskDefinition_withPidMode
=== RUN   TestAccAWSEcsTaskDefinition_constraint
=== PAUSE TestAccAWSEcsTaskDefinition_constraint
=== RUN   TestAccAWSEcsTaskDefinition_changeVolumesForcesNewResource
=== PAUSE TestAccAWSEcsTaskDefinition_changeVolumesForcesNewResource
=== RUN   TestAccAWSEcsTaskDefinition_arrays
=== PAUSE TestAccAWSEcsTaskDefinition_arrays
=== RUN   TestAccAWSEcsTaskDefinition_Fargate
=== PAUSE TestAccAWSEcsTaskDefinition_Fargate
=== RUN   TestAccAWSEcsTaskDefinition_ExecutionRole
=== PAUSE TestAccAWSEcsTaskDefinition_ExecutionRole
=== RUN   TestAccAWSEcsTaskDefinition_Inactive
=== PAUSE TestAccAWSEcsTaskDefinition_Inactive
=== RUN   TestAccAWSEcsTaskDefinition_Tags
=== PAUSE TestAccAWSEcsTaskDefinition_Tags
=== RUN   TestAccAWSEcsTaskDefinition_ProxyConfiguration
=== PAUSE TestAccAWSEcsTaskDefinition_ProxyConfiguration
=== RUN   TestAccAWSEcsTaskDefinition_inferenceAccelerator
=== PAUSE TestAccAWSEcsTaskDefinition_inferenceAccelerator
=== CONT  TestAccAWSEcsTaskDefinition_basic
=== CONT  TestAccAWSEcsTaskDefinition_withPidMode
=== CONT  TestAccAWSEcsTaskDefinition_inferenceAccelerator
=== CONT  TestAccAWSEcsTaskDefinition_withIPCMode
=== CONT  TestAccAWSEcsTaskDefinition_withNetworkMode
=== CONT  TestAccAWSEcsTaskDefinition_ProxyConfiguration
=== CONT  TestAccAWSEcsTaskDefinition_withTaskRoleArn
=== CONT  TestAccAWSEcsTaskDefinition_Tags
=== CONT  TestAccAWSEcsTaskDefinition_withEcsService
=== CONT  TestAccAWSEcsTaskDefinition_withTaskScopedDockerVolume
=== CONT  TestAccAWSEcsTaskDefinition_arrays
=== CONT  TestAccAWSEcsTaskDefinition_Inactive
=== CONT  TestAccAWSEcsTaskDefinition_ExecutionRole
=== CONT  TestAccAWSEcsTaskDefinition_withEFSVolume
=== CONT  TestAccAWSEcsTaskDefinition_changeVolumesForcesNewResource
=== CONT  TestAccAWSEcsTaskDefinition_withEFSVolumeMinimal
=== CONT  TestAccAWSEcsTaskDefinition_withDockerVolumeMinimalConfig
=== CONT  TestAccAWSEcsTaskDefinition_withDockerVolume
=== CONT  TestAccAWSEcsTaskDefinition_Fargate
=== CONT  TestAccAWSEcsTaskDefinition_constraint
--- PASS: TestAccAWSEcsTaskDefinition_constraint (27.05s)
=== CONT  TestAccAWSEcsTaskDefinition_withScratchVolume
--- PASS: TestAccAWSEcsTaskDefinition_inferenceAccelerator (27.13s)
--- PASS: TestAccAWSEcsTaskDefinition_withTaskScopedDockerVolume (27.96s)
--- PASS: TestAccAWSEcsTaskDefinition_arrays (27.99s)
--- PASS: TestAccAWSEcsTaskDefinition_withDockerVolumeMinimalConfig (28.06s)
--- PASS: TestAccAWSEcsTaskDefinition_withDockerVolume (28.63s)
--- PASS: TestAccAWSEcsTaskDefinition_withPidMode (28.75s)
--- PASS: TestAccAWSEcsTaskDefinition_withNetworkMode (29.35s)
--- PASS: TestAccAWSEcsTaskDefinition_ExecutionRole (29.35s)
--- PASS: TestAccAWSEcsTaskDefinition_withTaskRoleArn (29.47s)
--- PASS: TestAccAWSEcsTaskDefinition_withIPCMode (29.54s)
--- PASS: TestAccAWSEcsTaskDefinition_ProxyConfiguration (37.57s)
--- PASS: TestAccAWSEcsTaskDefinition_Fargate (37.63s)
--- PASS: TestAccAWSEcsTaskDefinition_withEFSVolume (39.05s)
--- PASS: TestAccAWSEcsTaskDefinition_withEFSVolumeMinimal (39.44s)
--- PASS: TestAccAWSEcsTaskDefinition_basic (43.49s)
--- PASS: TestAccAWSEcsTaskDefinition_Inactive (43.53s)
--- PASS: TestAccAWSEcsTaskDefinition_changeVolumesForcesNewResource (43.65s)
--- PASS: TestAccAWSEcsTaskDefinition_withScratchVolume (22.40s)
--- PASS: TestAccAWSEcsTaskDefinition_Tags (67.59s)
--- PASS: TestAccAWSEcsTaskDefinition_withEcsService (86.42s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	86.513s

@@ -699,7 +699,7 @@ func flattenEcsVolumes(list []*ecs.Volume) []map[string]interface{} {
l["docker_volume_configuration"] = flattenDockerVolumeConfiguration(volume.DockerVolumeConfiguration)
}

if volume.DockerVolumeConfiguration != nil {
if volume.EfsVolumeConfiguration != nil {
Copy link
Contributor

@deanshelton913 deanshelton913 Apr 12, 2020

Choose a reason for hiding this comment

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

I mean, all these changes are cool. but this one is clearly the coolest

@DrFaust92
Copy link
Collaborator Author

As a note to maintainers if possible to merge #12571 prior to this one that would be great

@DrFaust92 DrFaust92 added the bug Addresses a defect in current functionality. label May 22, 2020
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @DrFaust92 🚀

Output from acceptance testing:

--- PASS: TestAccAWSEcsTaskDefinition_arrays (14.80s)
--- PASS: TestAccAWSEcsTaskDefinition_basic (20.00s)
--- PASS: TestAccAWSEcsTaskDefinition_changeVolumesForcesNewResource (19.79s)
--- PASS: TestAccAWSEcsTaskDefinition_constraint (14.97s)
--- PASS: TestAccAWSEcsTaskDefinition_ExecutionRole (20.43s)
--- PASS: TestAccAWSEcsTaskDefinition_Fargate (19.62s)
--- PASS: TestAccAWSEcsTaskDefinition_Inactive (19.78s)
--- PASS: TestAccAWSEcsTaskDefinition_inferenceAccelerator (29.51s)
--- PASS: TestAccAWSEcsTaskDefinition_ProxyConfiguration (35.61s)
--- PASS: TestAccAWSEcsTaskDefinition_Tags (31.04s)
--- PASS: TestAccAWSEcsTaskDefinition_withDockerVolume (14.90s)
--- PASS: TestAccAWSEcsTaskDefinition_withDockerVolumeMinimalConfig (14.80s)
--- PASS: TestAccAWSEcsTaskDefinition_withEcsService (73.57s)
--- PASS: TestAccAWSEcsTaskDefinition_withEFSVolume (21.90s)
--- PASS: TestAccAWSEcsTaskDefinition_withEFSVolumeMinimal (21.71s)
--- PASS: TestAccAWSEcsTaskDefinition_withIPCMode (37.86s)
--- PASS: TestAccAWSEcsTaskDefinition_withNetworkMode (16.56s)
--- PASS: TestAccAWSEcsTaskDefinition_withPidMode (28.57s)
--- PASS: TestAccAWSEcsTaskDefinition_withScratchVolume (13.22s)
--- PASS: TestAccAWSEcsTaskDefinition_withTaskRoleArn (20.50s)
--- PASS: TestAccAWSEcsTaskDefinition_withTaskScopedDockerVolume (13.30s)

@bflad bflad removed the needs-triage Waiting for first response or review from a maintainer. label May 26, 2020
@bflad bflad added this to the v2.64.0 milestone May 26, 2020
@bflad bflad merged commit 95feb45 into hashicorp:master May 26, 2020
bflad added a commit that referenced this pull request May 26, 2020
@ghost
Copy link

ghost commented May 29, 2020

This has been released in version 2.64.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 for triage. Thanks!

@DrFaust92 DrFaust92 deleted the r/ecs_task_definition_volumes_hash branch June 23, 2020 11:29
@ghost
Copy link

ghost commented Jun 25, 2020

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!

@ghost ghost locked and limited conversation to collaborators Jun 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/ecs Issues and PRs that pertain to the ecs service. size/L Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws_ecs_task_definition does not detect changes to efs_volume_configuration block
4 participants