-
Notifications
You must be signed in to change notification settings - Fork 120
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
Breaking change of null keeper values between 3.3.2 and 3.4.0 #303
Comments
Hey all 👋 I'm also seeing this when upgrading from version my configuration: terraform {
required_providers{
random = {
version = "3.4.1"
}
}
}
resource "random_password" "datadog" {
length = 48
override_special = "_-"
keepers = {
password_change_serial = var.example_null
}
}
variable "example_null" {
type = string
default = null
} After applying with 3.3.2 and subsequently upgrading to the latest provider version i get the following during $ terraform plan
random_password.datadog: Refreshing state... [id=none]
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
-/+ destroy and then create replacement
Terraform will perform the following actions:
# random_password.datadog must be replaced
-/+ resource "random_password" "datadog" {
~ bcrypt_hash = (sensitive value)
~ id = "none" -> (known after apply)
+ keepers = {
+ "password_change_serial" = null
} # forces replacement
~ result = (sensitive value)
# (11 unchanged attributes hidden)
}
Plan: 1 to add, 0 to change, 1 to destroy.
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Note: You didn't use the -out option to save this plan, so Terraform can't guarantee to take exactly these actions if you run "terraform apply" now. full debug logs available at: https://gist.github.com/anGie44/75fef54e198d1828c97dce3faf6831ee The line that maybe is suspect though not familiar enough to be sure:
Oh nvm i see was intentional (hashicorp/terraform-plugin-framework#452) 😅 |
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.1.6
on linux_amd64
Terraform Configuration
Expected Behavior
Changing the provider version from
3.3.2
to3.4.0
shouldn't force a replacement.Actual Behavior
Running a plan of the terraform code above with the provider version set to
3.3.2
and then with3.4.0
forces a replacement. Apparentlynull
keys have started to appear in the state with 3.4.0 while they weren't added to the state before.Steps to Reproduce
3.3.2
terraform init
+terraform apply
3.4.0
terraform init -upgrade
terraform plan
Plan should be empty but it wants to recreate the resource instead:
How much impact is this issue causing?
High
Logs
No response
Additional Information
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: