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

r/aws_quicksight_data_source - parameters.s3.role_arn #41284

Merged

Conversation

GlennChia
Copy link
Collaborator

Description

Support role_arn for S3 data source.

Relations

Closes #31840

References

  • QuickSight S3Parameters

    • Use the RoleArn structure to override an account-wide role for a specific S3 data source. For example, say an account administrator has turned off all S3 access with an account-wide role. The administrator can then use RoleArn to bypass the account-wide role and allow S3 access for the single S3 data source that is specified in the structure, even if the account-wide role forbidding S3 access is still active.
  • QuickSight Run queries with Amazon S3 data sources

Output from Acceptance Testing

% make testacc TESTARGS='-run=TestAccQuickSightDataSource_s3RoleARN' PKG=quicksight ACCTEST_PARALLELISM=1
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/quicksight/... -v -count 1 -parallel 1  -run=TestAccQuickSightDataSource_s3RoleARN -timeout 360m -vet=off
2025/02/07 09:45:00 Initializing Terraform AWS Provider...
=== RUN   TestAccQuickSightDataSource_s3RoleARN
=== PAUSE TestAccQuickSightDataSource_s3RoleARN
=== CONT  TestAccQuickSightDataSource_s3RoleARN
--- PASS: TestAccQuickSightDataSource_s3RoleARN (68.95s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/quicksight 69.116s
testing: warning: no tests to run
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/quicksight/schema  0.094s [no tests to run]

...

Additional details

A retry is created in the code for 2 errors

  1. Failed to assume your role. Verify the trust relationships of the role in the IAM console is identified and then retried which allows the IAM Role Trust permission to propagate to allow the Role to be assumed.
  2. Insufficient permission to access the manifest file is identified and then retried which allows the IAM Role permissions to propagate such that S3 permissions can be used to read the manifest file

@GlennChia GlennChia requested a review from a team as a code owner February 7, 2025 09:51
Copy link

github-actions bot commented Feb 7, 2025

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 documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/quicksight Issues and PRs that pertain to the quicksight service. needs-triage Waiting for first response or review from a maintainer. partner Contribution from a partner. labels Feb 7, 2025
@GlennChia GlennChia changed the title f/aws_quicksight_data_source - parameter s3 support role_arn r/aws_quicksight_data_source - parameters.s3.role_arn Feb 7, 2025
@justinretzolk justinretzolk 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 Feb 7, 2025
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=TestAccQuickSightDataSource_
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.5 test ./internal/service/quicksight/... -v -count 1 -parallel 20 -run='TestAccQuickSightDataSource_'  -timeout 360m -vet=off
2025/02/11 10:59:13 Initializing Terraform AWS Provider...

--- PASS: TestAccQuickSightDataSource_disappears (38.80s)
--- PASS: TestAccQuickSightDataSource_basic (45.45s)
--- PASS: TestAccQuickSightDataSource_tags_ComputedTag_OnCreate (54.16s)
--- PASS: TestAccQuickSightDataSource_tags_EmptyMap (62.18s)
--- PASS: TestAccQuickSightDataSource_name (66.70s)
--- PASS: TestAccQuickSightDataSource_tags_AddOnUpdate (67.87s)
--- PASS: TestAccQuickSightDataSource_s3RoleARN (74.18s)
--- PASS: TestAccQuickSightDataSource_tags_DefaultTags_updateToResourceOnly (76.51s)
--- PASS: TestAccQuickSightDataSource_tags_DefaultTags_updateToProviderOnly (77.30s)
--- PASS: TestAccQuickSightDataSource_tags_ComputedTag_OnUpdate_Add (77.35s)
--- PASS: TestAccQuickSightDataSource_tags_ComputedTag_OnUpdate_Replace (78.03s)
--- PASS: TestAccQuickSightDataSource_tags_IgnoreTags_Overlap_DefaultTag (87.37s)
--- PASS: TestAccQuickSightDataSource_permissions (88.75s)
--- PASS: TestAccQuickSightDataSource_tags_IgnoreTags_Overlap_ResourceTag (92.35s)
--- PASS: TestAccQuickSightDataSource_tags_DefaultTags_overlapping (103.20s)
--- PASS: TestAccQuickSightDataSource_tags_DefaultTags_nonOverlapping (105.50s)
--- PASS: TestAccQuickSightDataSource_tags (120.34s)
--- PASS: TestAccQuickSightDataSource_tags_DefaultTags_providerOnly (128.34s)
--- PASS: TestAccQuickSightDataSource_secretARN (955.90s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/quicksight 962.965s

@jar-b
Copy link
Member

jar-b commented Feb 11, 2025

Thanks for your contribution, @GlennChia! 👍

Copy link
Contributor

@johnsonaj johnsonaj left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@jar-b jar-b merged commit 66408cd into hashicorp:main Feb 11, 2025
44 checks passed
@github-actions github-actions bot added this to the v5.87.0 milestone Feb 11, 2025
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. partner Contribution from a partner. service/quicksight Issues and PRs that pertain to the quicksight 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.

[Bug]: Insufficient permission to access the manifest file from aws_quicksight_data_source
4 participants