Merge pull request #11577 from hashicorp/f-diff-meta
terraform: add Meta field to diffs
This commit is contained in:
commit
c503caa4ad
|
@ -364,6 +364,12 @@ type InstanceDiff struct {
|
||||||
Destroy bool
|
Destroy bool
|
||||||
DestroyDeposed bool
|
DestroyDeposed bool
|
||||||
DestroyTainted bool
|
DestroyTainted bool
|
||||||
|
|
||||||
|
// Meta is a simple K/V map that is stored in a diff and persisted to
|
||||||
|
// plans but otherwise is completely ignored by Terraform core. It is
|
||||||
|
// mean to be used for additional data a resource may want to pass through.
|
||||||
|
// The value here must only contain Go primitives and collections.
|
||||||
|
Meta map[string]interface{}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *InstanceDiff) Lock() { d.mu.Lock() }
|
func (d *InstanceDiff) Lock() { d.mu.Lock() }
|
||||||
|
|
|
@ -31,6 +31,10 @@ func TestReadWritePlan(t *testing.T) {
|
||||||
RequiresNew: true,
|
RequiresNew: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Meta: map[string]interface{}{
|
||||||
|
"foo": []interface{}{1, 2, 3},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue