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_dashboard #31448

Merged
merged 11 commits into from
May 30, 2023

Conversation

comtef
Copy link
Contributor

@comtef comtef commented May 17, 2023

Description

New resource for Quicksight Dashboard.

  • Definition mostly reuse underlying resources shared with Template. (Helper method for template renamed for clarity).
  • Tests for basic usage, update, dashboard specific attributes

Includes fixes to existing Template resource :

  • Missing attribute and optional fields issues
  • The source entity and definition attributes cannot be both sent to the API on updates. Fixed behaviour to only send source entity when it has been used to create the resource initially
  • Source entity or definition are expected on update calls even if they are not updated
  • Resource update seems to use the status ResourceStatusCreationInProgress, updated waiter helper accordingly

Relations

Relates #10990
Closes #11835

References

https://docs.aws.amazon.com/quicksight/latest/APIReference/API_CreateDashboard.html
https://docs.aws.amazon.com/quicksight/latest/APIReference/API_UpdateDashboard.html
https://docs.aws.amazon.com/quicksight/latest/APIReference/API_DescribeDashboard.html
https://docs.aws.amazon.com/quicksight/latest/APIReference/API_DescribeDashboardDefinition.html
https://docs.aws.amazon.com/quicksight/latest/APIReference/API_DescribeDashboardPermissions.html
https://docs.aws.amazon.com/quicksight/latest/APIReference/API_DeleteDashboard.html

Output from Acceptance Testing

$ make testacc TESTS=TestAccQuickSightTemplate PKG=quicksight
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/quicksight/... -v -count 1 -parallel 20 -run='TestAccQuickSightTemplate'  -timeout 180m
=== RUN   TestAccQuickSightTemplateAlias_basic
=== PAUSE TestAccQuickSightTemplateAlias_basic
=== RUN   TestAccQuickSightTemplateAlias_disappears
=== PAUSE TestAccQuickSightTemplateAlias_disappears
=== RUN   TestAccQuickSightTemplate_basic
=== PAUSE TestAccQuickSightTemplate_basic
=== RUN   TestAccQuickSightTemplate_disappears
=== PAUSE TestAccQuickSightTemplate_disappears
=== RUN   TestAccQuickSightTemplate_barChart
=== PAUSE TestAccQuickSightTemplate_barChart
=== RUN   TestAccQuickSightTemplate_table
=== PAUSE TestAccQuickSightTemplate_table
=== RUN   TestAccQuickSightTemplate_sourceEntity
=== PAUSE TestAccQuickSightTemplate_sourceEntity
=== RUN   TestAccQuickSightTemplate_tags
=== PAUSE TestAccQuickSightTemplate_tags
=== RUN   TestAccQuickSightTemplate_update
=== PAUSE TestAccQuickSightTemplate_update
=== CONT  TestAccQuickSightTemplateAlias_basic
=== CONT  TestAccQuickSightTemplate_table
=== CONT  TestAccQuickSightTemplate_update
=== CONT  TestAccQuickSightTemplate_tags
=== CONT  TestAccQuickSightTemplate_sourceEntity
=== CONT  TestAccQuickSightTemplate_disappears
=== CONT  TestAccQuickSightTemplate_barChart
=== CONT  TestAccQuickSightTemplate_basic
=== CONT  TestAccQuickSightTemplateAlias_disappears
--- PASS: TestAccQuickSightTemplate_disappears (111.72s)
--- PASS: TestAccQuickSightTemplate_barChart (117.94s)
--- PASS: TestAccQuickSightTemplateAlias_disappears (118.72s)
--- PASS: TestAccQuickSightTemplate_basic (123.96s)
--- PASS: TestAccQuickSightTemplateAlias_basic (125.63s)
--- PASS: TestAccQuickSightTemplate_sourceEntity (143.07s)
--- PASS: TestAccQuickSightTemplate_table (164.41s)
--- PASS: TestAccQuickSightTemplate_update (190.49s)
--- PASS: TestAccQuickSightTemplate_tags (196.43s)
PASS



$ make testacc TESTS=TestAccQuickSightDashboard PKG=quicksight
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/quicksight/... -v -count 1 -parallel 20 -run='TestAccQuickSightDashboard'  -timeout 180m
=== RUN   TestAccQuickSightDashboard_basic
=== PAUSE TestAccQuickSightDashboard_basic
=== RUN   TestAccQuickSightDashboard_disappears
=== PAUSE TestAccQuickSightDashboard_disappears
=== RUN   TestAccQuickSightDashboard_sourceEntity
=== PAUSE TestAccQuickSightDashboard_sourceEntity
=== RUN   TestAccQuickSightDashboard_updateVersionNumber
=== PAUSE TestAccQuickSightDashboard_updateVersionNumber
=== RUN   TestAccQuickSightDashboard_dashboardSpecificConfig
=== PAUSE TestAccQuickSightDashboard_dashboardSpecificConfig
=== CONT  TestAccQuickSightDashboard_basic
=== CONT  TestAccQuickSightDashboard_updateVersionNumber
=== CONT  TestAccQuickSightDashboard_sourceEntity
=== CONT  TestAccQuickSightDashboard_disappears
=== CONT  TestAccQuickSightDashboard_dashboardSpecificConfig
--- PASS: TestAccQuickSightDashboard_disappears (81.84s)
--- PASS: TestAccQuickSightDashboard_dashboardSpecificConfig (85.23s)
--- PASS: TestAccQuickSightDashboard_basic (90.75s)
--- PASS: TestAccQuickSightDashboard_sourceEntity (97.55s)
--- PASS: TestAccQuickSightDashboard_updateVersionNumber (131.48s)
PASS

@github-actions
Copy link

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. needs-triage Waiting for first response or review from a maintainer. labels May 17, 2023
@jar-b jar-b removed the needs-triage Waiting for first response or review from a maintainer. label May 18, 2023
@comtef comtef marked this pull request as ready for review May 19, 2023 13:41
@jar-b jar-b self-assigned this May 19, 2023
@jar-b jar-b added this to the v5.1.0 milestone May 19, 2023
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=TestAccQuickSightDashboard_
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/quicksight/... -v -count 1 -parallel 20 -run='TestAccQuickSightDashboard_'  -timeout 180m
?       github.com/hashicorp/terraform-provider-aws/internal/service/quicksight/schema  [no test files]

--- PASS: TestAccQuickSightDashboard_disappears (41.29s)
--- PASS: TestAccQuickSightDashboard_dashboardSpecificConfig (46.03s)
--- PASS: TestAccQuickSightDashboard_basic (46.93s)
--- PASS: TestAccQuickSightDashboard_sourceEntity (49.92s)
--- PASS: TestAccQuickSightDashboard_updateVersionNumber (85.52s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/quicksight 88.721s
$ make testacc PKG=quicksight TESTS=TestAccQuickSightTemplate_
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/quicksight/... -v -count 1 -parallel 20 -run='TestAccQuickSightTemplate_'  -timeout 180m
?       github.com/hashicorp/terraform-provider-aws/internal/service/quicksight/schema  [no test files]

--- PASS: TestAccQuickSightTemplate_disappears (37.77s)
--- PASS: TestAccQuickSightTemplate_barChart (41.82s)
--- PASS: TestAccQuickSightTemplate_basic (41.85s)
--- PASS: TestAccQuickSightTemplate_sourceEntity (44.16s)
--- PASS: TestAccQuickSightTemplate_table (66.25s)
--- PASS: TestAccQuickSightTemplate_update (72.28s)
--- PASS: TestAccQuickSightTemplate_tags (88.91s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/quicksight 92.167s

@jar-b
Copy link
Member

jar-b commented May 22, 2023

This looks great, thanks @comtef!

As a heads up, main is currently only merging breaking changes and deprecations in preparation for the v5.0.0 major release this week. I've added the v5.1.0 label so this can go into the first subsequent minor release, tentatively the week of 5/29. Thanks again!

@comtef
Copy link
Contributor Author

comtef commented May 23, 2023

@jar-b Thanks for your help.
In the meantime, before v5 is released, I'll continue from this branch to start working on analysis resource.

@jar-b jar-b merged commit ef24363 into hashicorp:main May 30, 2023
@jar-b
Copy link
Member

jar-b commented May 30, 2023

Thanks for your contribution once again, @comtef! 🎸

@github-actions
Copy link

github-actions bot commented Jun 1, 2023

This functionality has been released in v5.1.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 Jul 2, 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 Jul 2, 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. 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_dashboard
2 participants