helper/diff: mark removed keys as removed
This commit is contained in:
parent
2d97738636
commit
96e09440d4
|
@ -58,6 +58,9 @@ func testResourceDiffStr(rd *terraform.ResourceDiff) string {
|
|||
if attrDiff.NewComputed {
|
||||
v = "<computed>"
|
||||
}
|
||||
if attrDiff.NewRemoved {
|
||||
v = "<removed>"
|
||||
}
|
||||
|
||||
newResource := ""
|
||||
if attrDiff.RequiresNew {
|
||||
|
|
|
@ -116,7 +116,7 @@ func (b *ResourceBuilder) Diff(
|
|||
for k, _ := range matchingKeys {
|
||||
attrs[k] = &terraform.ResourceAttrDiff{
|
||||
Old: s.Attributes[k],
|
||||
New: "",
|
||||
NewRemoved: true,
|
||||
Type: terraform.DiffAttrInput,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -240,7 +240,7 @@ const testRBComplexDiff = `UPDATE
|
|||
`
|
||||
|
||||
const testRBComplexReplaceDiff = `UPDATE
|
||||
IN listener.0.port: "80" => ""
|
||||
IN listener.0.port: "80" => "<removed>"
|
||||
IN listener.0.value: "" => "50"
|
||||
`
|
||||
|
||||
|
|
|
@ -165,6 +165,7 @@ type ResourceAttrDiff struct {
|
|||
Old string // Old Value
|
||||
New string // New Value
|
||||
NewComputed bool // True if new value is computed (unknown currently)
|
||||
NewRemoved bool // True if this attribute is being removed
|
||||
NewExtra interface{} // Extra information for the provider
|
||||
RequiresNew bool // True if change requires new resource
|
||||
Type DiffAttrType
|
||||
|
|
Loading…
Reference in New Issue