-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
feat: remove ForceNew for email #43014
Conversation
Community GuidelinesThis 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
Pull Request Authors
|
There was a problem hiding this 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
fromemail
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 |
There was a problem hiding this 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]
@stefanfreitag Thanks for the contribution 🎉 👏. |
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. |
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! |
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 argumentemail
.At the moment the argument is configured with
ForceNew
. Actuallyemail
can be updated without re-creating the resource, henceForceNew
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 anupdate
action (instead ofdelete, create
) on the resource.