-
Notifications
You must be signed in to change notification settings - Fork 10.3k
incorrect rendering of null and unknown in a map(string) #33016
Copy link
Copy link
Closed
Labels
bugconfirmeda Terraform Core team member has reproduced this issuea Terraform Core team member has reproduced this issue
Description
Terraform Version
Terraform >=1.4.0
Terraform v1.4.4
on linux_amd64Terraform Configuration Files
variable "force_spn_rotation" {
type = bool
}
resource "null_resource" "force_rotation" {
triggers = {
rotation = var.force_spn_rotation ? timestamp() : null
}
}
Debug Output
terraform init https://gist.github.com/RBurot/31009782f8a5f8019ebb97937ee91221
terraform plan variable is true https://gist.github.com/RBurot/7b4475734b1405f2605ec5c01858cc39
terraform plan variable is false https://gist.github.com/RBurot/efe5bc2f25706168a19cf6d4abef855b
Expected Behavior
if variable is true
+ resource "null_resource" "force_rotation" {
+ id = (known after apply)
+ triggers = {
+ "rotation" = (known after apply)
}
}
if variable is false
+ resource "null_resource" "force_rotation" {
+ id = (known after apply)
+ triggers = {
+ "rotation" = null
}
}
Actual Behavior
if variable is true
+ resource "null_resource" "force_rotation" {
+ id = (known after apply)
+ triggers = {}
}
if variable is false
+ resource "null_resource" "force_rotation" {
+ id = (known after apply)
+ triggers = {
+ "rotation" = "\x1b[90mnull\x1b[0m\x1b[0m"
}
}
Steps to Reproduce
- terraform init
- terraform plan
Additional Context
It's the expected behavior with the latest 1.3.9
it seems that appears with version 1.4.0 and it's currently present on 1.4.4 (even in the 1.5.0.Alpha)
References
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugconfirmeda Terraform Core team member has reproduced this issuea Terraform Core team member has reproduced this issue