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

Allow updates to aws_msk_connector connector_configuration #41685

Conversation

epbensimpson
Copy link
Contributor

@epbensimpson epbensimpson commented Mar 6, 2025

Description

In January 2025 MSK was updated to allow changes to a connector's configuration without recreating the connector.

The aws_mskconnect_connector needs updating to handle this. UpdateConnector only accepts one of capacity or connectorConfiguration per call. As such, we need to check which of these has changes and call the API separately for each change. We also need to get the new connector version in between the requests.

Relations

Closes #40914

References

Output from Acceptance Testing

The test should pass (verified the expected values in the console), but ran into some errors on the cleanup due to restricted delete permissions for kafka clusters and S3 buckets on my end.

make testacc TESTS=TestAccKafkaConnectConnector_update PKG=kafkaconnect
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.5 test ./internal/service/kafkaconnect/... -v -count 1 -parallel 20 -run='TestAccKafkaConnectConnector_update'  -timeout 360m -vet=off
2025/03/06 15:40:15 Initializing Terraform AWS Provider...
=== RUN   TestAccKafkaConnectConnector_update
=== PAUSE TestAccKafkaConnectConnector_update
=== CONT  TestAccKafkaConnectConnector_update
    connector_test.go:122: Error running post-test destroy, there may be dangling resources: exit status 1

        Error: deleting S3 Bucket (tf-acc-test-4099055771575791490): operation error S3: DeleteBucket, https response error StatusCode: 403, RequestID: R9NKR1WS1JSP2W2E, HostID: G6fnpG9rOz/WZifQi3BT8+iVeWL6Dv67kkzKl7l/tw3Qz6Jc28mAChlOmzQbqrKgzFF98Y43tinrNRYpDEc2CQ==, api error AccessDenied: <redacted> is not authorized to perform: s3:DeleteBucket on resource: "arn:aws:s3:::tf-acc-test-4099055771575791490" with an explicit deny in an identity-based policy


        Error: deleting MSK Cluster (<redacted>): operation error Kafka: DeleteCluster, https response error StatusCode: 403, RequestID: 8fb02e2e-b131-4e70-a012-c91fa84daba3, api error AccessDeniedException: <redacted> is not authorized to perform: kafka:DeleteCluster on <redacted> with an explicit deny

--- FAIL: TestAccKafkaConnectConnector_update (2786.44s)
FAIL
FAIL	github.com/hashicorp/terraform-provider-aws/internal/service/kafkaconnect	2791.752s
FAIL
make: *** [testacc] Error 1

@epbensimpson epbensimpson requested a review from a team as a code owner March 6, 2025 03:43
Copy link

github-actions bot commented Mar 6, 2025

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.

Copy link

github-actions bot commented Mar 6, 2025

⚠️ We've detected the following potential issues with your pull request

Maintainer Edit Permissions:

At times, our maintainers need to make direct edits to pull requests in order to prepare it to be merged. At the time of opening this pull request, your settings do not allow maintainers to make such edits. If possible, update your settings as described in the following document. If your fork is owned by an organization that limits your ability to make this change, please let us know.

GitHub: Allowing changes to a pull request branch created from a fork

@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/kafkaconnect Issues and PRs that pertain to the kafkaconnect service. size/M Managed by automation to categorize the size of a PR. labels Mar 6, 2025
@epbensimpson
Copy link
Contributor Author

The fork is owned by an organization, I cannot enable Allow edits from maintainers for the PR

@ewbankkit ewbankkit 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 Mar 6, 2025
@epbensimpson
Copy link
Contributor Author

The lint failed due to something I didn't change (afaict), but it did bring to my attention that waitConnectorUpdated returns DescribeConnectorOutput so I can remove my additional call to DescribeConnector and use that instead.

@ewbankkit ewbankkit self-assigned this Mar 6, 2025
@github-actions github-actions bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Mar 6, 2025
@ewbankkit
Copy link
Contributor

@epbensimpson Thanks for the contribution 🎉 👏.
I have moved your work into #41706 so that we can get it merged promptly.

@ewbankkit ewbankkit closed this pull request by merging all changes into hashicorp:main in 6dd9cfa Mar 7, 2025
Copy link

github-actions bot commented Mar 7, 2025

Warning

This Issue has been closed, meaning that any additional comments are much easier for the maintainers to miss. 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.

1 similar comment
Copy link

github-actions bot commented Mar 7, 2025

Warning

This Issue has been closed, meaning that any additional comments are much easier for the maintainers to miss. 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.91.0 milestone Mar 7, 2025
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. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. service/kafkaconnect Issues and PRs that pertain to the kafkaconnect 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.

Amazon MSK Connect now supports updating connector configuration
2 participants