cli: Fix nested set diff rendering indentation
This commit is contained in:
parent
2d0349d9a4
commit
b562c4fb84
|
@ -615,14 +615,14 @@ func (p *blockBodyDiffPrinter) writeNestedAttrDiff(
|
|||
}
|
||||
|
||||
path := append(path, cty.IndexStep{Key: val})
|
||||
p.writeAttrsDiff(objS.Attributes, oldValue, newValue, indent+6, path, result)
|
||||
p.writeAttrsDiff(objS.Attributes, oldValue, newValue, indent+8, path, result)
|
||||
|
||||
p.buf.WriteString("\n")
|
||||
p.buf.WriteString(strings.Repeat(" ", indent+4))
|
||||
p.buf.WriteString(strings.Repeat(" ", indent+6))
|
||||
p.buf.WriteString("},")
|
||||
}
|
||||
p.buf.WriteString("\n")
|
||||
p.writeSkippedElems(unchanged, indent+4)
|
||||
p.writeSkippedElems(unchanged, indent+6)
|
||||
p.buf.WriteString(strings.Repeat(" ", indent+2))
|
||||
p.buf.WriteString("]")
|
||||
|
||||
|
|
|
@ -2800,8 +2800,8 @@ func TestResourceChange_nestedSet(t *testing.T) {
|
|||
~ ami = "ami-BEFORE" -> "ami-AFTER"
|
||||
~ disks = [
|
||||
+ {
|
||||
+ mount_point = "/var/diska"
|
||||
},
|
||||
+ mount_point = "/var/diska"
|
||||
},
|
||||
]
|
||||
id = "i-02ae66f368e8518a9"
|
||||
|
||||
|
@ -2861,13 +2861,13 @@ func TestResourceChange_nestedSet(t *testing.T) {
|
|||
~ ami = "ami-BEFORE" -> "ami-AFTER"
|
||||
~ disks = [
|
||||
+ {
|
||||
+ mount_point = "/var/diska"
|
||||
+ size = "50GB"
|
||||
},
|
||||
+ mount_point = "/var/diska"
|
||||
+ size = "50GB"
|
||||
},
|
||||
- {
|
||||
- mount_point = "/var/diska" -> null
|
||||
},
|
||||
# (1 unchanged element hidden)
|
||||
- mount_point = "/var/diska" -> null
|
||||
},
|
||||
# (1 unchanged element hidden)
|
||||
]
|
||||
id = "i-02ae66f368e8518a9"
|
||||
|
||||
|
@ -2925,13 +2925,13 @@ func TestResourceChange_nestedSet(t *testing.T) {
|
|||
~ ami = "ami-BEFORE" -> "ami-AFTER"
|
||||
~ disks = [
|
||||
- { # forces replacement
|
||||
- mount_point = "/var/diska" -> null
|
||||
- size = "50GB" -> null
|
||||
},
|
||||
- mount_point = "/var/diska" -> null
|
||||
- size = "50GB" -> null
|
||||
},
|
||||
+ { # forces replacement
|
||||
+ mount_point = "/var/diskb"
|
||||
+ size = "50GB"
|
||||
},
|
||||
+ mount_point = "/var/diskb"
|
||||
+ size = "50GB"
|
||||
},
|
||||
]
|
||||
id = "i-02ae66f368e8518a9"
|
||||
|
||||
|
@ -2982,9 +2982,9 @@ func TestResourceChange_nestedSet(t *testing.T) {
|
|||
~ ami = "ami-BEFORE" -> "ami-AFTER"
|
||||
~ disks = [
|
||||
- {
|
||||
- mount_point = "/var/diska" -> null
|
||||
- size = "50GB" -> null
|
||||
},
|
||||
- mount_point = "/var/diska" -> null
|
||||
- size = "50GB" -> null
|
||||
},
|
||||
]
|
||||
id = "i-02ae66f368e8518a9"
|
||||
|
||||
|
@ -3071,9 +3071,9 @@ func TestResourceChange_nestedSet(t *testing.T) {
|
|||
~ ami = "ami-BEFORE" -> "ami-AFTER"
|
||||
+ disks = [
|
||||
+ {
|
||||
+ mount_point = "/var/diska"
|
||||
+ size = "50GB"
|
||||
},
|
||||
+ mount_point = "/var/diska"
|
||||
+ size = "50GB"
|
||||
},
|
||||
]
|
||||
id = "i-02ae66f368e8518a9"
|
||||
|
||||
|
@ -3127,9 +3127,9 @@ func TestResourceChange_nestedSet(t *testing.T) {
|
|||
~ ami = "ami-BEFORE" -> "ami-AFTER"
|
||||
~ disks = [
|
||||
- {
|
||||
- mount_point = "/var/diska" -> null
|
||||
- size = "50GB" -> null
|
||||
},
|
||||
- mount_point = "/var/diska" -> null
|
||||
- size = "50GB" -> null
|
||||
},
|
||||
] -> (known after apply)
|
||||
id = "i-02ae66f368e8518a9"
|
||||
|
||||
|
|
Loading…
Reference in New Issue