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

New resource aws_quicksight_folder #30400

Merged
merged 7 commits into from
Apr 3, 2023

Conversation

comtef
Copy link
Contributor

@comtef comtef commented Apr 2, 2023

Description

Implementation of aws_quicksight_folder.

I refactored common code for permissions and fixed an issue as all permissions needs to be included in grants, even already present actions. Otherwise, the API raises this kind of error:

Error: error updating QuickSight Folder (tf-acc-test-6965107116578139189) permissions: InvalidParameterValueException: ResourcePermission list contains unsupported permission sets [quicksight:CreateFolderMembership, quicksight:CreateFolder, quicksight:UpdateFolderPermissions, quicksight:UpdateFolder, quicksight:DeleteFolder, quicksight:DeleteFolderMembership, quicksight:DescribeFolderPermissions] for this resource. Valid sets : [quicksight:DescribeFolder] or [quicksight:CreateFolder, quicksight:DescribeFolder, quicksight:UpdateFolder, quicksight:DeleteFolder, quicksight:CreateFolderMembership, quicksight:DeleteFolderMembership, quicksight:DescribeFolderPermissions, quicksight:UpdateFolderPermissions]

Relations

Relates #10990
Closes #23083

References

https://docs.aws.amazon.com/quicksight/latest/APIReference/API_CreateFolder.html
https://docs.aws.amazon.com/quicksight/latest/APIReference/API_DeleteFolder.html
https://docs.aws.amazon.com/quicksight/latest/APIReference/API_DescribeFolder.html
https://docs.aws.amazon.com/quicksight/latest/APIReference/API_DescribeFolderPermissions.html
https://docs.aws.amazon.com/quicksight/latest/APIReference/API_UpdateFolder.html
https://docs.aws.amazon.com/quicksight/latest/APIReference/API_UpdateFolderPermissions.html

Output from Acceptance Testing

$ make testacc TESTS=TestAccQuickSightFolder PKG=quicksight
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/quicksight/... -v -count 1 -parallel 20 -run='TestAccQuickSightFolder'  -timeout 180m
=== RUN   TestAccQuickSightFolder_basic
=== PAUSE TestAccQuickSightFolder_basic
=== RUN   TestAccQuickSightFolder_disappears
=== PAUSE TestAccQuickSightFolder_disappears
=== RUN   TestAccQuickSightFolder_permissions
=== PAUSE TestAccQuickSightFolder_permissions
=== RUN   TestAccQuickSightFolder_tags
=== PAUSE TestAccQuickSightFolder_tags
=== RUN   TestAccQuickSightFolder_parentFolder
=== PAUSE TestAccQuickSightFolder_parentFolder
=== CONT  TestAccQuickSightFolder_basic
=== CONT  TestAccQuickSightFolder_permissions
=== CONT  TestAccQuickSightFolder_parentFolder
=== CONT  TestAccQuickSightFolder_tags
=== CONT  TestAccQuickSightFolder_disappears
--- PASS: TestAccQuickSightFolder_disappears (19.27s)
--- PASS: TestAccQuickSightFolder_basic (25.62s)
--- PASS: TestAccQuickSightFolder_tags (26.41s)
--- PASS: TestAccQuickSightFolder_parentFolder (27.20s)
--- PASS: TestAccQuickSightFolder_permissions (62.16s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/quicksight 62.257s

@github-actions
Copy link

github-actions bot commented Apr 2, 2023

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. generators Relates to code generators. service/quicksight Issues and PRs that pertain to the quicksight service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Apr 2, 2023
@jar-b jar-b self-assigned this Apr 3, 2023
@comtef comtef force-pushed the f_aws_quicksight_folder branch 2 times, most recently from d80b3fa to bd10f74 Compare April 3, 2023 13:43
Copy link
Member

@jar-b jar-b left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

$ make testacc PKG=quicksight TESTS=TestAccQuickSightFolder_
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/quicksight/... -v -count 1 -parallel 20 -run='TestAccQuickSightFolder_'  -timeout 180m
=== RUN   TestAccQuickSightFolder_basic
=== PAUSE TestAccQuickSightFolder_basic
=== RUN   TestAccQuickSightFolder_disappears
=== PAUSE TestAccQuickSightFolder_disappears
=== RUN   TestAccQuickSightFolder_permissions
=== PAUSE TestAccQuickSightFolder_permissions
=== RUN   TestAccQuickSightFolder_tags
=== PAUSE TestAccQuickSightFolder_tags
=== RUN   TestAccQuickSightFolder_parentFolder
=== PAUSE TestAccQuickSightFolder_parentFolder
=== CONT  TestAccQuickSightFolder_basic
=== CONT  TestAccQuickSightFolder_tags
=== CONT  TestAccQuickSightFolder_permissions
=== CONT  TestAccQuickSightFolder_parentFolder
=== CONT  TestAccQuickSightFolder_disappears
--- PASS: TestAccQuickSightFolder_disappears (13.91s)
--- PASS: TestAccQuickSightFolder_basic (19.86s)
--- PASS: TestAccQuickSightFolder_parentFolder (42.51s)
--- PASS: TestAccQuickSightFolder_tags (51.28s)
--- PASS: TestAccQuickSightFolder_permissions (60.60s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/quicksight 64.131s

@jar-b jar-b added the new-resource Introduces a new resource. label Apr 3, 2023
@jar-b jar-b merged commit 6716a0a into hashicorp:main Apr 3, 2023
@github-actions github-actions bot added this to the v4.62.0 milestone Apr 3, 2023
@jar-b
Copy link
Member

jar-b commented Apr 3, 2023

Thanks for your contribution, @comtef! 👏

@github-actions
Copy link

github-actions bot commented Apr 7, 2023

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

@github-actions
Copy link

github-actions bot commented May 8, 2023

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 May 8, 2023
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-resource Introduces a new resource. service/quicksight Issues and PRs that pertain to the quicksight service. size/XL 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.

Additional QuickSight resource: aws_quicksight_folder
2 participants