-
Notifications
You must be signed in to change notification settings - Fork 118
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
Upgrade v2.2.1 -> v3.4.0 forces replacement #302
Comments
have same issue after upgrade 3.3.2 -> 3.4.0 upd. but we have it like this:
|
Hi folks 👋 If you could continue to show your resource configurations and the plan outputs where this is occurring, that would be immensely helpful to ensure we capture all the issues. For configurations using For example switching the last comment configuration from: resource "random_password" "some-pass" {
length = 16
special = true
lifecycle { ignore_changes = [keepers, length, lower, min_lower, min_numeric, min_special, min_upper, number, numeric, special, upper] }
} To: resource "random_password" "some-pass" {
length = 16
special = true
lifecycle { ignore_changes = [length, special] }
} Please let reach out if it does/doesn't. |
tried
no difference with previous tries:
|
Same issue for us, here's a reproducible example of a Prior to upgrade:
Post upgrade to 3.4.0:
We have plenty of other occurrences by I guess they are all due to the same reasons. The problem still occurs with v3.4.1 |
We have similar issues. The following was working fine on provider I just ran a plan using provider Now on the later provider it defaults to
I have now pinned to the old provider. My other option is to manually fix the statefile I suppose. This is effectively a breaking change - so shouldn't it at least have been a major version bump? |
Hi @scott-doyland-burrows thank you for supplying the configuration and Terraform CLI output. I'm unable to reproduce with this configuration: resource "random_password" "pwapi_primary" {
length = 32
min_lower = 10
min_numeric = 12
min_upper = 10
special = false
} By first applying it with 3.3.2 then again with 3.4.2. I see the same issue as described in random_password Showing Unexpected Plan 3.3.2 to 3.4.2 |
I can not recreate it either when running from scratch, my statefile after a brand new run using 3.3.2 shows However my statefile from my actual terraform run from a month ago shows: So, applying against the statefile that has So it looks to me like 3.3.2 considers |
@scott-doyland-burrows thanks for the clarification. @lra can you confirm that you have the following in your state file prior to running terraform apply with v3.4.2:
|
The resource mentioned does not exist anymore, but I have others, here's one:
With
"attributes": {
"bcrypt_hash": "REDACTED",
"id": "none",
"keepers": null,
"length": null,
"lower": null,
"min_lower": null,
"min_numeric": null,
"min_special": null,
"min_upper": null,
"number": null,
"numeric": null,
"override_special": null,
"result": "REDACTED",
"special": null,
"upper": null
}, And if I
Hope it helps! |
I have this in my statefile currently, which causes NO diff when running against provider 3.3.2 - but causes the
|
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Terraform CLI and Provider Versions
Terraform v1.2.8
on darwin_amd64
Terraform Configuration
Expected Behavior
When a password was created with v2.2.1, I expect to be able to upgrade to v3.4.0 and for there to be no changes to the password.
Actual Behavior
When a password was created with v2.2.1, when I upgrade to v3.4.0 the password is replaced:
Steps to Reproduce
terraform init
,terraform apply
terraform init -upgrade
,terraform apply
Note that going from v2.2.1 to v3.3.2 does not force replacement of the password. If I then update to v3.4.0 then the password is still not replaced. The password is only replaced with a jump upgrade straight from v2.2.1 to v3.4.0
If it's just impossible to support this jump upgrade then that's ok, but it would be ideal if this did work.
How much impact is this issue causing?
Medium
Logs
https://gist.github.com/blgm/e6f41c1209d1394a986344324bebc4ef
Additional Information
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: