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

[Bug]: MWAA Environment with customer managed endpoints error #39388

Closed
alexbacchin opened this issue Sep 19, 2024 · 4 comments · Fixed by #39394
Closed

[Bug]: MWAA Environment with customer managed endpoints error #39388

alexbacchin opened this issue Sep 19, 2024 · 4 comments · Fixed by #39394
Labels
bug Addresses a defect in current functionality. service/mwaa Issues and PRs that pertain to the mwaa service.
Milestone

Comments

@alexbacchin
Copy link
Contributor

Terraform Core Version

1.5.7

AWS Provider Version

5.67.0

Affected Resource(s)

aws_mwaa_environment

Expected Behavior

If set endpoint_management="CUSTOMER" the MVWAA environment will be created in PENDING state. It will be waiting the VPC endpoints to be created to become AVAILABLE

Actual Behavior

the resource expects the state to be AVAILABLE and thrown an error. The resource fails the apply even though the MWAA environment is in a valid state.

Relevant Error/Panic Output Snippet

waiting for MWAA Environment (test-airflow) create: unexpected state 'PENDING', wanted target 'AVAILABLE'. last error: %!s(<nil>)

Terraform Configuration Files

data "aws_kms_alias" "service_mwaa" {
  name = "alias/service-mwaa"
}

resource "aws_mwaa_environment" "mwaa" {
  name              = var.name
  airflow_version   = var.airflow_version
  environment_class = var.environment_class
  min_workers       = var.min_workers
  max_workers       = var.max_workers
  min_webservers    = var.min_webservers
  max_webservers    = var.max_webservers
  kms_key           = data.aws_kms_alias.service_mwaa.target_key_arn

  dag_s3_path                      = var.dag_s3_path
  plugins_s3_object_version        = var.plugins_s3_object_version
  plugins_s3_path                  = var.plugins_s3_path
  requirements_s3_path             = var.requirements_s3_path
  requirements_s3_object_version   = var.requirements_s3_object_version
  startup_script_s3_path           = var.startup_script_s3_path
  startup_script_s3_object_version = var.startup_script_s3_object_version
  schedulers                       = var.schedulers
  execution_role_arn               = module.mwaa_execution_role.iam_role_arn
  airflow_configuration_options    = local.airflow_configuration_options
  endpoint_management              = "CUSTOMER"
  source_bucket_arn                = module.s3_airflow_bucket.s3_bucket_arn
  webserver_access_mode            = "PRIVATE_ONLY"
  weekly_maintenance_window_start  = var.weekly_maintenance_window_start


  network_configuration {
    security_group_ids = [aws_security_group.mwaa.id]
    subnet_ids         = local.airflow_subnet_ids
  }
}

Steps to Reproduce

terraform apply

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

Yes

@alexbacchin alexbacchin added the bug Addresses a defect in current functionality. label Sep 19, 2024
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this 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.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added service/kms Issues and PRs that pertain to the kms service. service/mwaa Issues and PRs that pertain to the mwaa service. needs-triage Waiting for first response or review from a maintainer. labels Sep 19, 2024
@ewbankkit ewbankkit removed service/kms Issues and PRs that pertain to the kms service. needs-triage Waiting for first response or review from a maintainer. labels Sep 19, 2024
Copy link

Warning

This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.

@github-actions github-actions bot added this to the v5.68.0 milestone Sep 19, 2024
Copy link

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

Copy link

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 22, 2024
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/mwaa Issues and PRs that pertain to the mwaa service.
Projects
None yet
2 participants