-
Notifications
You must be signed in to change notification settings - Fork 156
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
Pulumi tries to replace iam.UserLoginProfile
if passwordResetRequired
is set, the password was changed and the stack refreshed
#3750
Comments
iam.UserLoginProfile.passwordResetRequired
not retained after refreshiam.UserLoginProfile
if passwordResetRequired
is set, the password was changed and the stack refreshed
iam.UserLoginProfile
if passwordResetRequired
is set, the password was changed and the stack refreshediam.UserLoginProfile
if passwordResetRequired
is set, the password was changed and the stack refreshed
@rafalkrupinski it looks like this is working as the upstream provider intended, although the documentation is definitely a little confusing (not sure why it mentions creation when updating is not possible). I think the way to handle this is with the ignoreChanges resource option. |
Can't imagine it's an intended behaviour. Hope the bug report from a pulumi user is honoured by the upstream maintainers. |
The property is indeed marked as ForceNew upstream: https://github.com/hashicorp/terraform-provider-aws/blob/0d1d7b6c5eb9f8e2c5265b35df7ddde5852c15d8/internal/service/iam/user_login_profile.go#L58 The property description is translated faithfully from the upstream docs So I think our behavior is by design here. @corymhall Do you want to keep the issue open to track any work on our side? If so, please label it with a |
From a user perspective it doesn't work as intended. The flag should apply only on resource creation, and I (as a user) know nothing of ForceNew. To me it seems it's an undesired combined effect of aws changing the field after fulfilling its desired purpose + ForceNew. The I realize it's an upstream problem, and I've reported it there too. |
upstream issue hashicorp/terraform-provider-aws#23567 |
The upstream issue got fixed by not changing passwordResetRequired in Read: https://github.com/hashicorp/terraform-provider-aws/pull/36926/files#diff-7b4e00a7f40cb5504072acf00eb8a74f6f24ab1fa0336bdebebc67c77516a6f0 This is now inherited by pulumi.
I'm going to close as fixed but please open a new issue if there's something else that can be improved here. |
What happened?
pulumi up
to create resources as in the examplepulumi refresh
- detects change ofpasswordResetRequired
to falsepulumi up
At the last step pulumi reports the login profile will be replaced, but fails to create a second login profile for the user before the old one is removed, while it shouldn't try replacing the login profile at all.
Documentation for
passwordResetRequired
says itOnly applies at resource creation
.Example
Output of
pulumi about
CLI
Version 3.111.1
Go Version go1.22.1
Go Compiler gc
Host
OS debian
Version 12.5
Arch x86_64
Pulumi locates its logs in /tmp by default
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered: