Skip to content

feat:add input argument to enable worker replacement strategy #43041

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

JPSerras
Copy link

@JPSerras JPSerras commented Jun 16, 2025

Description

Added support for the worker_replacement_strategy input argument to the module, enabling its use with AWS MWAA environments via the UpdateEnvironment API:
https://aws.amazon.com/about-aws/whats-new/2025/05/amazon-mwaa-option-update-environments-without-interrupting-task-execution/

Relations

Closes #42842

Output from Acceptance Testing

Test to verify that the worker_replacement_strategy is set to the value GRACEFUL:

% make testacc TESTS=updateAirflowWorkerReplacementStrategy PKG=mwaa
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.10 test ./internal/service/mwaa/... -v -count 1 -parallel 20 -run='updateAirflowWorkerReplacementStrategy'  -timeout 360m -vet=off
2025/06/16 22:51:45 Initializing Terraform AWS Provider...
=== RUN   TestAccMWAAEnvironment_updateAirflowWorkerReplacementStrategy
=== PAUSE TestAccMWAAEnvironment_updateAirflowWorkerReplacementStrategy
=== CONT  TestAccMWAAEnvironment_updateAirflowWorkerReplacementStrategy
--- PASS: TestAccMWAAEnvironment_updateAirflowWorkerReplacementStrategy (3733.88s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/mwaa	3739.289s

Test to verify nothing was broken previously:

% make testacc TESTS=TestAccMWAAEnvironment_basic PKG=mwaa
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.10 test ./internal/service/mwaa/... -v -count 1 -parallel 20 -run='TestAccMWAAEnvironment_basic'  -timeout 360m -vet=off
2025/06/17 00:13:33 Initializing Terraform AWS Provider...
=== RUN   TestAccMWAAEnvironment_basic
=== PAUSE TestAccMWAAEnvironment_basic
=== CONT  TestAccMWAAEnvironment_basic
--- PASS: TestAccMWAAEnvironment_basic (2827.29s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/mwaa	2832.816s
...

Copy link
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 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/mwaa Issues and PRs that pertain to the mwaa service. size/M Managed by automation to categorize the size of a PR. labels Jun 16, 2025
Copy link
Contributor

github-actions bot commented Jun 16, 2025

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

@JPSerras JPSerras force-pushed the f-aws_mwaa_environment-worker-replacement-strategy-r branch from 0e6d45d to 1947c90 Compare June 17, 2025 00:29
@JPSerras JPSerras marked this pull request as ready for review June 17, 2025 00:53
@JPSerras JPSerras requested a review from a team as a code owner June 17, 2025 00:53
@justinretzolk justinretzolk added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Jun 17, 2025
@JPSerras JPSerras force-pushed the f-aws_mwaa_environment-worker-replacement-strategy-r branch from 1947c90 to 5c0f423 Compare June 18, 2025 21:13
@JPSerras
Copy link
Author

Hey @justinretzolk
Do you think this can be prioritised for review?
Since AWS is going to start doing Maintenance on MWAA?

After July 9, 2025, Managed Workflows for Apache Airflow (MWAA) will start updating environments automatically during its weekly maintenance window to ensure that customers are running the latest and most secure code for their particular Airflow version. MWAA has recently released a graceful update feature that will wait for ongoing workflow tasks to complete before removing older workers. However, enabling graceful updates requires an initial, disruptive update. As such, we recommend you to update your MWAA environment at the earliest convenient time before July 9, 2025, to prevent task disruption during the first maintenance window environment update [1]. No changes to your current environment configuration are required.

@Bennyelg
Copy link

Bennyelg commented Jul 2, 2025

??

@alexopoulos7
Copy link

Any progress here?

@Bennyelg
Copy link

Seems like we all need to switch to OpenTofu like yesterday

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/mwaa Issues and PRs that pertain to the mwaa service. size/M 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.

Add new aws_mwaa_environment property "Worker replacement strategy" (graceful / forced)
4 participants