]> git.immae.eu Git - github/fretlink/terraform-provider-statuscake.git/blobdiff - vendor/github.com/hashicorp/terraform/terraform/diff.go
deps: github.com/hashicorp/terraform@sdk-v0.11-with-go-modules
[github/fretlink/terraform-provider-statuscake.git] / vendor / github.com / hashicorp / terraform / terraform / diff.go
index fd1687e7ed6c622812f6c7bd2e031c5836da6f68..d6dc550616150e09c8e72e068e0fb83ec8a92924 100644 (file)
@@ -23,6 +23,12 @@ const (
        DiffUpdate
        DiffDestroy
        DiffDestroyCreate
+
+       // DiffRefresh is only used in the UI for displaying diffs.
+       // Managed resource reads never appear in plan, and when data source
+       // reads appear they are represented as DiffCreate in core before
+       // transforming to DiffRefresh in the UI layer.
+       DiffRefresh // TODO: Actually use DiffRefresh in core too, for less confusion
 )
 
 // multiVal matches the index key to a flatmapped set, list or map
@@ -831,7 +837,14 @@ func (d *InstanceDiff) Same(d2 *InstanceDiff) (bool, string) {
                        }
                }
 
-               // TODO: check for the same value if not computed
+               // We don't compare the values because we can't currently actually
+               // guarantee to generate the same value two two diffs created from
+               // the same state+config: we have some pesky interpolation functions
+               // that do not behave as pure functions (uuid, timestamp) and so they
+               // can be different each time a diff is produced.
+               // FIXME: Re-organize our config handling so that we don't re-evaluate
+               // expressions when we produce a second comparison diff during
+               // apply (for EvalCompareDiff).
        }
 
        // Check for leftover attributes