Skip to content

feat: remove ForceNew for email #43014

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

Conversation

stefanfreitag
Copy link
Contributor

@stefanfreitag stefanfreitag commented Jun 13, 2025

Rollback Plan

If a change needs to be reverted, we will publish an updated version of the library.

Changes to Security Controls

No changes to security controls by this pull request.

Description

The resource aws_quicksight_user contains an argument email.

At the moment the argument is configured with ForceNew. Actually email can be updated without re-creating the resource, hence ForceNew is removed from the argument.

Relations

Closes #42944

References

Output from Acceptance Testing

I updated the existing test TestAccQuickSightUser_withInvalidFormattedEmailStillWorks. When changing the e-mail address, a validation checks for an update action (instead of delete, create) on the resource.

make testacc TESTS=TestAccQuickSightUser  PKG=quicksight
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.10 test ./internal/service/quicksight/... -v -count 1 -parallel 20 -run='TestAccQuickSightUser'  -timeout 360m -vet=off
2025/06/14 15:33:01 Initializing Terraform AWS Provider...
=== RUN   TestAccQuickSightUserDataSource_basic
=== PAUSE TestAccQuickSightUserDataSource_basic
=== RUN   TestAccQuickSightUser_basic
=== PAUSE TestAccQuickSightUser_basic
=== RUN   TestAccQuickSightUser_withInvalidFormattedEmailStillWorks
=== PAUSE TestAccQuickSightUser_withInvalidFormattedEmailStillWorks
=== RUN   TestAccQuickSightUser_withNamespace
    user_test.go:101: Environment variable QUICKSIGHT_NAMESPACE is not set
--- SKIP: TestAccQuickSightUser_withNamespace (0.00s)
=== RUN   TestAccQuickSightUser_disappears
=== PAUSE TestAccQuickSightUser_disappears
=== CONT  TestAccQuickSightUserDataSource_basic
=== CONT  TestAccQuickSightUser_disappears
=== CONT  TestAccQuickSightUser_withInvalidFormattedEmailStillWorks
=== CONT  TestAccQuickSightUser_basic
--- PASS: TestAccQuickSightUserDataSource_basic (32.36s)
--- PASS: TestAccQuickSightUser_disappears (34.16s)
--- PASS: TestAccQuickSightUser_basic (52.18s)
--- PASS: TestAccQuickSightUser_withInvalidFormattedEmailStillWorks (53.10s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/quicksight 53.317s
testing: warning: no tests to run
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/quicksight/schema  0.094s [no tests to run]`
``

Copy link

Community Guidelines

This comment is added to every new Pull Request to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀

Voting for Prioritization

  • Please vote on this Pull Request by adding a 👍 reaction to the original post to help the community and maintainers prioritize it.
  • Please see our prioritization guide for additional information on how the maintainers handle prioritization.
  • Please do not leave +1 or other comments that do not add relevant new information or questions; they generate extra noise for others following the Pull Request and do not help prioritize the request.

Pull Request Authors

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • 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 needs-triage Waiting for first response or review from a maintainer. service/quicksight Issues and PRs that pertain to the quicksight service. size/XS Managed by automation to categorize the size of a PR. external-maintainer Contribution from a trusted external contributor. labels Jun 13, 2025
@github-actions github-actions bot added the tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. label Jun 14, 2025
@stefanfreitag stefanfreitag marked this pull request as ready for review June 14, 2025 13:57
@Copilot Copilot AI review requested due to automatic review settings June 14, 2025 13:57
@stefanfreitag stefanfreitag requested a review from a team as a code owner June 14, 2025 13:57
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes the ForceNew flag from the email argument on the aws_quicksight_user resource so that email can be updated in place, and updates the acceptance test to assert an update action rather than a recreate when the email changes.

  • Remove ForceNew from email in the resource schema
  • Add a plan check in the acceptance test to expect an update action on email change
  • Add a changelog entry noting the bugfix

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
internal/service/quicksight/user.go Removed ForceNew: true for the email attribute
internal/service/quicksight/user_test.go Imported plancheck and added a PreApply check for Update
.changelog/43014.txt Added release-note entry for the bugfix

@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Jun 16, 2025
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 🚀.

% make testacc TESTARGS='-run=TestAccQuickSightUser_' PKG=quicksight
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.10 test ./internal/service/quicksight/... -v -count 1 -parallel 20  -run=TestAccQuickSightUser_ -timeout 360m -vet=off
2025/06/16 10:48:06 Initializing Terraform AWS Provider...
=== RUN   TestAccQuickSightUser_basic
=== PAUSE TestAccQuickSightUser_basic
=== RUN   TestAccQuickSightUser_withInvalidFormattedEmailStillWorks
=== PAUSE TestAccQuickSightUser_withInvalidFormattedEmailStillWorks
=== RUN   TestAccQuickSightUser_withNamespace
    user_test.go:100: Environment variable QUICKSIGHT_NAMESPACE is not set
--- SKIP: TestAccQuickSightUser_withNamespace (0.00s)
=== RUN   TestAccQuickSightUser_disappears
=== PAUSE TestAccQuickSightUser_disappears
=== CONT  TestAccQuickSightUser_basic
=== CONT  TestAccQuickSightUser_disappears
=== CONT  TestAccQuickSightUser_withInvalidFormattedEmailStillWorks
--- PASS: TestAccQuickSightUser_disappears (17.71s)
--- PASS: TestAccQuickSightUser_basic (28.37s)
--- PASS: TestAccQuickSightUser_withInvalidFormattedEmailStillWorks (29.27s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/quicksight	34.191s
testing: warning: no tests to run
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/quicksight/schema	0.543s [no tests to run]

@ewbankkit ewbankkit self-assigned this Jun 16, 2025
@github-actions github-actions bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Jun 16, 2025
@ewbankkit ewbankkit added the bug Addresses a defect in current functionality. label Jun 16, 2025
@ewbankkit
Copy link
Contributor

@stefanfreitag Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit 2c8975b into hashicorp:main Jun 19, 2025
45 checks passed
Copy link

Warning

This Issue has been closed, meaning that any additional comments are much easier for the maintainers to miss. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.

@github-actions github-actions bot added this to the v6.1.0 milestone Jun 19, 2025
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Jun 26, 2025
Copy link

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

@stefanfreitag stefanfreitag deleted the b-aws_quicksight_user-remove-forcenew-from-email-argument branch June 26, 2025 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Addresses a defect in current functionality. external-maintainer Contribution from a trusted external contributor. service/quicksight Issues and PRs that pertain to the quicksight service. size/XS 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.

aws_quicksight_user is getting replaced when email is changing
2 participants