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

resource/aws_ecs_task_definition: Prevents failures when target was deleted outside of Terraform #39690

Merged
merged 4 commits into from
Oct 15, 2024

Conversation

gdavison
Copy link
Contributor

@gdavison gdavison commented Oct 11, 2024

Description

If an aws_ecs_task_definition is deleted outside of Terraform, it would cause an error

Closes #29749.

Output from Acceptance Testing

% make testacc PKG=ecs TESTS=TestAccECSTaskDefinition_

--- PASS: TestAccECSTaskDefinition_invalidContainerDefinition (5.57s)
--- PASS: TestAccECSTaskDefinition_containerDefinitionDockerLabels (61.26s)
--- PASS: TestAccECSTaskDefinition_containerDefinitionNullPortMapping (65.35s)
--- PASS: TestAccECSTaskDefinition_unknownContainerDefinitions (65.69s)
--- PASS: TestAccECSTaskDefinition_pidMode (74.77s)
--- PASS: TestAccECSTaskDefinition_inferenceAccelerator (79.75s)
--- PASS: TestAccECSTaskDefinition_arrays (80.21s)
--- PASS: TestAccECSTaskDefinition_constraint (87.62s)
--- PASS: TestAccECSTaskDefinition_Fargate_ephemeralStorage (88.30s)
--- PASS: TestAccECSTaskDefinition_trackLatest (88.44s)
--- PASS: TestAccECSTaskDefinition_networkMode (88.54s)
--- PASS: TestAccECSTaskDefinition_proxy (88.64s)
--- PASS: TestAccECSTaskDefinition_EFSVolume_basic (90.32s)
--- PASS: TestAccECSTaskDefinition_executionRole (90.41s)
--- PASS: TestAccECSTaskDefinition_ipcMode (90.47s)
--- PASS: TestAccECSTaskDefinition_DockerVolume_minimal (90.34s)
--- PASS: TestAccECSTaskDefinition_basic (137.98s)
--- PASS: TestAccECSTaskDefinition_changeVolumesForcesNewResource (138.61s)
--- PASS: TestAccECSTaskDefinition_taskRoleARN (85.92s)
--- PASS: TestAccECSTaskDefinition_Fargate_runtimePlatformWithoutArch (84.04s)
--- PASS: TestAccECSTaskDefinition_EFSVolume_minimal (86.80s)
--- PASS: TestAccECSTaskDefinition_DockerVolume_taskScoped (64.58s)
--- PASS: TestAccECSTaskDefinition_Fargate_runtimePlatform (76.85s)
--- PASS: TestAccECSTaskDefinition_configuredAtLaunch (71.43s)
--- PASS: TestAccECSTaskDefinition_runtimePlatform (82.01s)
--- PASS: TestAccECSTaskDefinition_v5590ContainerDefinitionsRegression (162.35s)
--- PASS: TestAccECSTaskDefinition_scratchVolume (72.79s)
--- PASS: TestAccECSTaskDefinition_tags (169.33s)
--- PASS: TestAccECSTaskDefinition_EFSVolume_transitEncryption (82.60s)
--- PASS: TestAccECSTaskDefinition_EFSVolume_transitEncryptionMinimal (80.98s)
--- PASS: TestAccECSTaskDefinition_Fargate_basic (83.86s)
--- PASS: TestAccECSTaskDefinition_EFSVolume_transitEncryptionDisabled (83.35s)
--- PASS: TestAccECSTaskDefinition_EFSVolume_accessPoint (82.59s)
--- PASS: TestAccECSTaskDefinition_DockerVolume_basic (36.29s)
--- PASS: TestAccECSTaskDefinition_disappears (42.25s)
--- PASS: TestAccECSTaskDefinition_containerDefinitionEmptyPortMappings (183.14s)
--- PASS: TestAccECSTaskDefinition_service (177.51s)
--- PASS: TestAccECSTaskDefinition_fsxWinFileSystem (3285.52s)

@gdavison gdavison requested a review from a team as a code owner October 11, 2024 20:40
@github-actions github-actions bot added tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/ecs Issues and PRs that pertain to the ecs service. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. labels Oct 11, 2024
Copy link

Community Note

Voting for Prioritization

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

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

Copy link
Contributor

@ewbankkit ewbankkit left a 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_basic\|TestAccECSTaskDefinition_disappears' PKG=ecs
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.1 test ./internal/service/ecs/... -v -count 1 -parallel 20  -run=TestAccECSTaskDefinition_basic\|TestAccECSTaskDefinition_disappears -timeout 360m
=== RUN   TestAccECSTaskDefinition_basic
=== PAUSE TestAccECSTaskDefinition_basic
=== RUN   TestAccECSTaskDefinition_disappears
=== PAUSE TestAccECSTaskDefinition_disappears
=== CONT  TestAccECSTaskDefinition_basic
=== CONT  TestAccECSTaskDefinition_disappears
--- PASS: TestAccECSTaskDefinition_disappears (19.45s)
--- PASS: TestAccECSTaskDefinition_basic (22.08s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ecs	27.492s

@gdavison gdavison merged commit baf1751 into main Oct 15, 2024
53 checks passed
@gdavison gdavison deleted the b-ecs-task-defn-disappears branch October 15, 2024 18:54
@github-actions github-actions bot added this to the v5.72.0 milestone Oct 15, 2024
Copy link

This functionality has been released in v5.72.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!

@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service/ecs Issues and PRs that pertain to the ecs service. 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.

[Bug]: aws_ecs_task_definition throws error when task definition is deleted outside of terraform
2 participants