Skip to content

r/aws_ecs_daemon: Wait for daemon capacity provider updates#48422

Open
kurochan wants to merge 1 commit into
hashicorp:mainfrom
kurochan:b-aws_ecs_daemon-capacity-provider-wait
Open

r/aws_ecs_daemon: Wait for daemon capacity provider updates#48422
kurochan wants to merge 1 commit into
hashicorp:mainfrom
kurochan:b-aws_ecs_daemon-capacity-provider-wait

Conversation

@kurochan

Copy link
Copy Markdown
Contributor

Description

This fixes an eventual consistency issue in aws_ecs_daemon updates.

After creating or updating an ECS daemon, the provider previously waited only for the daemon status to become ACTIVE. ECS can report the daemon as active before the current revision details reflect the requested daemon_task_definition_arn and capacity_provider_arns, which can cause Terraform to fail with “Provider produced inconsistent result after apply”.

The provider now waits until the daemon is ACTIVE and the current revision matches the planned task definition ARN and capacity provider ARN set before writing state. The comparison is order-independent. The change also retries daemon revision reads when ECS briefly returns a not found response for the current revision.

Output from Acceptance Testing

% make testacc TESTS=TestAccECSDaemon_updateCapacityProviderARNs PKG=ecs

Not run. Unfortunately, I do not have access to an AWS account suitable for running this ECS acceptance test.

@kurochan kurochan requested a review from a team as a code owner June 16, 2026 04:36
@dosubot dosubot Bot added the bug Addresses a defect in current functionality. label Jun 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Community Guidelines

This comment is added to every new Pull Request to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀

Voting for Prioritization

  • Please vote on this Pull Request by adding a 👍 reaction to the original post to help the community and maintainers prioritize it.
  • Please see our prioritization guide for additional information on how the maintainers handle prioritization.
  • Please do not leave +1 or other comments that do not add relevant new information or questions; they generate extra noise for others following the Pull Request and do not help prioritize the request.

Pull Request Authors

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

✅ Thank you for correcting the previously detected issues! The maintainers appreciate your efforts to make the review process as smooth as possible.

@github-actions github-actions Bot added needs-triage Waiting for first response or review from a maintainer. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/ecs Issues and PRs that pertain to the ecs service. size/XL Managed by automation to categorize the size of a PR. labels Jun 16, 2026
@kurochan kurochan force-pushed the b-aws_ecs_daemon-capacity-provider-wait branch from f7f57e5 to d143ea0 Compare June 16, 2026 04:39
tsushanth

This comment was marked as spam.

@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Addresses a defect in current functionality. service/ecs Issues and PRs that pertain to the ecs service. size/XL 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.

3 participants