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

feat: Add tags support to aws_mskconnect resources and data sources #38270

Merged
merged 16 commits into from
Jul 8, 2024

Conversation

acwwat
Copy link
Contributor

@acwwat acwwat commented Jul 7, 2024

Description

This PR is to add tags support to the aws_mskconnect resources and data sources.

While working on this feature, I also found that the aws_mskconnect_worker_configuration was missing resource deletion support. I am not sure if this was for historical reason, but the DeleteWorkerConfiguration API action exists. As such I have added it as part of the PR.

Relations

Closes #36375.
Closes #38249.
Closes #36672.
Closes #37010.
Closes #36186.
Closes #28966.

References

Referred to the API reference for specs.

Output from Acceptance Testing

aws_mskconnect_connector resource and data source:

$ make testacc TESTS="TestAccKafkaConnectConnector_tags|TestAccKafkaConnectConnectorDataSource_" PKG=kafkaconnect
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.4 test ./internal/service/kafkaconnect/... -v -count 1 -parallel 20 -run='TestAccKafkaConnectConnector_tags|TestAccKafkaConnectConnectorDataSource_'  -timeout 360m
=== RUN   TestAccKafkaConnectConnectorDataSource_basic
=== PAUSE TestAccKafkaConnectConnectorDataSource_basic
=== RUN   TestAccKafkaConnectConnector_tags
=== PAUSE TestAccKafkaConnectConnector_tags
=== CONT  TestAccKafkaConnectConnectorDataSource_basic
=== CONT  TestAccKafkaConnectConnector_tags
--- PASS: TestAccKafkaConnectConnector_tags (2407.91s)
--- PASS: TestAccKafkaConnectConnectorDataSource_basic (2410.76s)
PASS
ok    github.com/hashicorp/terraform-provider-aws/internal/service/kafkaconnect       2411.163s

$

aws_mskconnect_custom_plugin resource and data source:

$ make testacc TESTS="TestAccKafkaConnectCustomPlugin_|TestAccKafkaConnectCustomPluginDataSource_" PKG=kafkaconnect
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.4 test ./internal/service/kafkaconnect/... -v -count 1 -parallel 20 -run='TestAccKafkaConnectCustomPlugin_|TestAccKafkaConnectCustomPluginDataSource_'  -timeout 360m
=== RUN   TestAccKafkaConnectCustomPluginDataSource_basic
=== PAUSE TestAccKafkaConnectCustomPluginDataSource_basic
=== RUN   TestAccKafkaConnectCustomPlugin_basic
=== PAUSE TestAccKafkaConnectCustomPlugin_basic
=== RUN   TestAccKafkaConnectCustomPlugin_disappears
=== PAUSE TestAccKafkaConnectCustomPlugin_disappears
=== RUN   TestAccKafkaConnectCustomPlugin_description
=== PAUSE TestAccKafkaConnectCustomPlugin_description
=== RUN   TestAccKafkaConnectCustomPlugin_tags
=== PAUSE TestAccKafkaConnectCustomPlugin_tags
=== RUN   TestAccKafkaConnectCustomPlugin_objectVersion
=== PAUSE TestAccKafkaConnectCustomPlugin_objectVersion
=== CONT  TestAccKafkaConnectCustomPluginDataSource_basic
=== CONT  TestAccKafkaConnectCustomPlugin_description
=== CONT  TestAccKafkaConnectCustomPlugin_objectVersion
=== CONT  TestAccKafkaConnectCustomPlugin_disappears
=== CONT  TestAccKafkaConnectCustomPlugin_basic
=== CONT  TestAccKafkaConnectCustomPlugin_tags
--- PASS: TestAccKafkaConnectCustomPlugin_disappears (33.25s)
--- PASS: TestAccKafkaConnectCustomPluginDataSource_basic (33.27s)
--- PASS: TestAccKafkaConnectCustomPlugin_basic (40.42s)
--- PASS: TestAccKafkaConnectCustomPlugin_objectVersion (42.40s)
--- PASS: TestAccKafkaConnectCustomPlugin_description (42.73s)
--- PASS: TestAccKafkaConnectCustomPlugin_tags (78.82s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/kafkaconnect       79.086s

$

aws_mskconnect_worker_configuration resource and data source:

$ make testacc TESTS="TestAccKafkaConnectWorkerConfiguration_|TestAccKafkaConnectWorkerConfigurationDataSource_" PKG=kafkaconnect
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.4 test ./internal/service/kafkaconnect/... -v -count 1 -parallel 20 -run='TestAccKafkaConnectWorkerConfiguration_|TestAccKafkaConnectWorkerConfigurationDataSource_'  -timeout 360m
=== RUN   TestAccKafkaConnectWorkerConfigurationDataSource_basic
=== PAUSE TestAccKafkaConnectWorkerConfigurationDataSource_basic
=== RUN   TestAccKafkaConnectWorkerConfiguration_basic
=== PAUSE TestAccKafkaConnectWorkerConfiguration_basic
=== RUN   TestAccKafkaConnectWorkerConfiguration_disappears
=== PAUSE TestAccKafkaConnectWorkerConfiguration_disappears
=== RUN   TestAccKafkaConnectWorkerConfiguration_description
=== PAUSE TestAccKafkaConnectWorkerConfiguration_description
=== RUN   TestAccKafkaConnectWorkerConfiguration_tags
=== PAUSE TestAccKafkaConnectWorkerConfiguration_tags
=== CONT  TestAccKafkaConnectWorkerConfigurationDataSource_basic
=== CONT  TestAccKafkaConnectWorkerConfiguration_description
=== CONT  TestAccKafkaConnectWorkerConfiguration_tags
=== CONT  TestAccKafkaConnectWorkerConfiguration_disappears
=== CONT  TestAccKafkaConnectWorkerConfiguration_basic
--- PASS: TestAccKafkaConnectWorkerConfiguration_disappears (18.79s)
--- PASS: TestAccKafkaConnectWorkerConfigurationDataSource_basic (21.39s)
--- PASS: TestAccKafkaConnectWorkerConfiguration_basic (24.70s)
--- PASS: TestAccKafkaConnectWorkerConfiguration_description (26.54s)
--- PASS: TestAccKafkaConnectWorkerConfiguration_tags (45.10s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/kafkaconnect       45.370s

$

@acwwat acwwat requested a review from a team as a code owner July 7, 2024 06:45
Copy link

github-actions bot commented Jul 7, 2024

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.

@github-actions github-actions bot added size/XL Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. tags Pertains to resource tagging. generators Relates to code generators. service/kafkaconnect Issues and PRs that pertain to the kafkaconnect service. labels Jul 7, 2024
@terraform-aws-provider terraform-aws-provider bot added needs-triage Waiting for first response or review from a maintainer. external-maintainer Contribution from a trusted external contributor. labels Jul 7, 2024
@acwwat acwwat force-pushed the f-aws_mskconnect-add_tags_support branch 2 times, most recently from bc9398c to 1d32f2a Compare July 7, 2024 07:16
@acwwat acwwat changed the title [WIP] feat: Add tags support to aws_mskconnect resources and data sources feat: Add tags support to aws_mskconnect resources and data sources Jul 7, 2024
@acwwat acwwat force-pushed the f-aws_mskconnect-add_tags_support branch from 1d32f2a to 0fc9a84 Compare July 7, 2024 07:19
@acwwat
Copy link
Contributor Author

acwwat commented Jul 7, 2024

Just realized that #37010 already implemented the deletion logic for aws_mskconnect_worker_configuration. This PR may need rebasing if that PR ends up merged before this PR.

@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Jul 8, 2024
Copy link

github-actions bot commented Jul 8, 2024

Thank you for your contribution! 🚀

Please note that typically Go dependency changes are handled in this repository by dependabot or the maintainers. This is to prevent pull request merge conflicts and further delay reviews of contributions. Remove any changes to the go.mod or go.sum files and commit them into this pull request.

Additional details:

  • Check open pull requests with the dependencies label to view other dependency updates.
  • If this pull request includes an update the AWS Go SDK (or any other dependency) version, only updates submitted via dependabot will be merged. This pull request will need to remove these changes and will need to be rebased after the existing dependency update via dependabot has been merged for this pull request to be reviewed.
  • If this pull request is for supporting a new AWS service:
    • Ensure the new AWS service changes are following the Contributing Guide section on new services, in particular that the dependency addition and initial provider support are in a separate pull request from other changes (e.g. new resources). Contributions not following this item will not be reviewed until the changes are split.
    • If this pull request is already a separate pull request from the above item, you can ignore this message.

@github-actions github-actions bot added linter Pertains to changes to or issues with the various linters. sweeper Pertains to changes to or issues with the sweeper. client-connections Pertains to the AWS Client and service connections. labels Jul 8, 2024
ewbankkit added 2 commits July 8, 2024 15:55
…s nil, not map[string]interface {}` panic when `log_delivery.worker_log_delivery` is empty (`{}`).
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 🚀.

% ACCTEST_TIMEOUT=720m make testacc TESTARGS='-run=TestAccKafkaConnect' PKG=kafkaconnect ACCTEST_PARALLELISM=3
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.4 test ./internal/service/kafkaconnect/... -v -count 1 -parallel 3  -run=TestAccKafkaConnect -timeout 720m
=== RUN   TestAccKafkaConnectConnectorDataSource_basic
=== PAUSE TestAccKafkaConnectConnectorDataSource_basic
=== RUN   TestAccKafkaConnectConnector_basic
=== PAUSE TestAccKafkaConnectConnector_basic
=== RUN   TestAccKafkaConnectConnector_disappears
=== PAUSE TestAccKafkaConnectConnector_disappears
=== RUN   TestAccKafkaConnectConnector_update
=== PAUSE TestAccKafkaConnectConnector_update
=== RUN   TestAccKafkaConnectConnector_tags
=== PAUSE TestAccKafkaConnectConnector_tags
=== RUN   TestAccKafkaConnectCustomPluginDataSource_basic
=== PAUSE TestAccKafkaConnectCustomPluginDataSource_basic
=== RUN   TestAccKafkaConnectCustomPlugin_basic
=== PAUSE TestAccKafkaConnectCustomPlugin_basic
=== RUN   TestAccKafkaConnectCustomPlugin_disappears
=== PAUSE TestAccKafkaConnectCustomPlugin_disappears
=== RUN   TestAccKafkaConnectCustomPlugin_description
=== PAUSE TestAccKafkaConnectCustomPlugin_description
=== RUN   TestAccKafkaConnectCustomPlugin_tags
=== PAUSE TestAccKafkaConnectCustomPlugin_tags
=== RUN   TestAccKafkaConnectCustomPlugin_objectVersion
=== PAUSE TestAccKafkaConnectCustomPlugin_objectVersion
=== RUN   TestAccKafkaConnectWorkerConfigurationDataSource_basic
=== PAUSE TestAccKafkaConnectWorkerConfigurationDataSource_basic
=== RUN   TestAccKafkaConnectWorkerConfiguration_basic
=== PAUSE TestAccKafkaConnectWorkerConfiguration_basic
=== RUN   TestAccKafkaConnectWorkerConfiguration_disappears
=== PAUSE TestAccKafkaConnectWorkerConfiguration_disappears
=== RUN   TestAccKafkaConnectWorkerConfiguration_description
=== PAUSE TestAccKafkaConnectWorkerConfiguration_description
=== RUN   TestAccKafkaConnectWorkerConfiguration_tags
=== PAUSE TestAccKafkaConnectWorkerConfiguration_tags
=== CONT  TestAccKafkaConnectConnectorDataSource_basic
=== CONT  TestAccKafkaConnectCustomPlugin_description
=== CONT  TestAccKafkaConnectWorkerConfiguration_basic
--- PASS: TestAccKafkaConnectCustomPlugin_description (34.97s)
=== CONT  TestAccKafkaConnectWorkerConfiguration_description
--- PASS: TestAccKafkaConnectConnectorDataSource_basic (1852.52s)
=== CONT  TestAccKafkaConnectWorkerConfiguration_tags
--- PASS: TestAccKafkaConnectWorkerConfiguration_description (13.36s)
=== CONT  TestAccKafkaConnectCustomPlugin_objectVersion
--- PASS: TestAccKafkaConnectCustomPlugin_objectVersion (40.77s)
=== CONT  TestAccKafkaConnectWorkerConfigurationDataSource_basic
--- PASS: TestAccKafkaConnectWorkerConfiguration_basic (15.15s)
=== CONT  TestAccKafkaConnectWorkerConfiguration_disappears
--- PASS: TestAccKafkaConnectWorkerConfiguration_tags (29.60s)
=== CONT  TestAccKafkaConnectConnector_tags
--- PASS: TestAccKafkaConnectWorkerConfiguration_disappears (11.82s)
=== CONT  TestAccKafkaConnectCustomPlugin_disappears
--- PASS: TestAccKafkaConnectWorkerConfigurationDataSource_basic (13.01s)
=== CONT  TestAccKafkaConnectCustomPlugin_basic
--- PASS: TestAccKafkaConnectCustomPlugin_disappears (33.25s)
=== CONT  TestAccKafkaConnectCustomPluginDataSource_basic
--- PASS: TestAccKafkaConnectCustomPlugin_basic (35.22s)
=== CONT  TestAccKafkaConnectConnector_disappears
--- PASS: TestAccKafkaConnectCustomPluginDataSource_basic (26.65s)
=== CONT  TestAccKafkaConnectConnector_update
--- PASS: TestAccKafkaConnectConnector_tags (2786.41s)
=== CONT  TestAccKafkaConnectConnector_basic
--- PASS: TestAccKafkaConnectConnector_basic (1863.57s)
=== CONT  TestAccKafkaConnectCustomPlugin_tags
--- PASS: TestAccKafkaConnectConnector_disappears (2570.85s)
--- PASS: TestAccKafkaConnectCustomPlugin_tags (61.44s)
--- PASS: TestAccKafkaConnectConnector_update (3015.55s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/kafkaconnect	12465.262s

@ewbankkit
Copy link
Contributor

@acwwat Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit f14f51c into hashicorp:main Jul 8, 2024
61 checks passed
@github-actions github-actions bot added this to the v5.58.0 milestone Jul 8, 2024
Copy link

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

@acwwat acwwat deleted the f-aws_mskconnect-add_tags_support branch July 19, 2024 02:49
Copy link

I'm going to lock this pull request 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 related to this change, 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 Aug 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
client-connections Pertains to the AWS Client and service connections. documentation Introduces or discusses updates to documentation. external-maintainer Contribution from a trusted external contributor. generators Relates to code generators. linter Pertains to changes to or issues with the various linters. service/kafkaconnect Issues and PRs that pertain to the kafkaconnect service. size/XL Managed by automation to categorize the size of a PR. sweeper Pertains to changes to or issues with the sweeper. tags Pertains to resource tagging. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
2 participants