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

Added the data source for a Slack Workspace #37218

Merged

Conversation

madhavvishnubhatta
Copy link
Contributor

Description

Added a new data source Slack Workspace for the service AWS Chatbot

Relations

Relates #12304
or
Closes #37123

References

https://awscli.amazonaws.com/v2/documentation/api/latest/reference/chatbot/delete-slack-workspace-authorization.html
https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/chatbot#Client.DescribeSlackWorkspaces

Output from Acceptance Testing

$ make testacc PKG=chatbot TESTS=TestAccChatbotSlackWorkspace*
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.2 test ./internal/service/chatbot/... -v -count 1 -parallel 20 -run='TestAccChatbotSlackWorkspace*'  -timeout 360m
=== RUN   TestAccChatbotSlackWorkspaceDataSource_basic
=== PAUSE TestAccChatbotSlackWorkspaceDataSource_basic
=== CONT  TestAccChatbotSlackWorkspaceDataSource_basic
--- PASS: TestAccChatbotSlackWorkspaceDataSource_basic (34.01s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/chatbot    47.826s

Copy link

github-actions bot commented May 2, 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/L 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. generators Relates to code generators. service/chatbot Issues and PRs that pertain to the chatbot service. and removed size/L Managed by automation to categorize the size of a PR. labels May 2, 2024
@terraform-aws-provider terraform-aws-provider bot added needs-triage Waiting for first response or review from a maintainer. partner Contribution from a partner. labels May 2, 2024
@madhavvishnubhatta madhavvishnubhatta marked this pull request as ready for review May 2, 2024 09:24
@justinretzolk justinretzolk added new-data-source Introduces a new data source. and removed needs-triage Waiting for first response or review from a maintainer. labels May 2, 2024
@YakDriver YakDriver self-assigned this May 23, 2024
@terraform-aws-provider terraform-aws-provider bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label May 23, 2024
@YakDriver YakDriver force-pushed the f-aws_chatbot_slack_workspace branch from c2b9fbe to a3d45a4 Compare May 23, 2024 21:44
Copy link
Member

@YakDriver YakDriver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution! LGTM 🎉

Comment on lines +69 to +70
data.SlackTeamID = flex.StringToFramework(ctx, out.SlackTeamId)
data.SlackTeamName = flex.StringToFramework(ctx, out.SlackTeamName)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
data.SlackTeamID = flex.StringToFramework(ctx, out.SlackTeamId)
data.SlackTeamName = flex.StringToFramework(ctx, out.SlackTeamName)
resp.Diagnostics.Append(flex.Flatten(ctx, out, &data)...)

Since I can't readily test this, I won't make this change. However, I would encourage you to try it and, if it works, submit a PR to update this later. This simplifies code and should help make things more future proof. If it doesn't work, let us know so we can work on a fix.

@YakDriver YakDriver merged commit 934d002 into hashicorp:main May 23, 2024
44 checks passed
@github-actions github-actions bot added this to the v5.51.0 milestone May 23, 2024
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label May 24, 2024
Copy link

This functionality has been released in v5.51.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 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 Jun 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. generators Relates to code generators. new-data-source Introduces a new data source. partner Contribution from a partner. service/chatbot Issues and PRs that pertain to the chatbot service. 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.

[New Data Source]: aws_chatbot_slack_workspace
3 participants